Chapter Contents |
Previous |
Next |
The GANTT Procedure |
The Activity data set for PROC CPM is the WIDGETA data set from Example 2.2, which defines the widget manufacturing project in AOA format. The project is scheduled subject to weekends, and the holidays are defined in the HOLDATA data set. The resulting schedule is stored in the output data set SAVEHP. The GANTT procedure is next invoked to produce a Logic Gantt chart by specifying the HEAD= and TAIL= options in the CHART statement. The TRIPLEX font is used for all text except for the first TITLE by specifying it globally using the FTEXT= option in a GOPTIONS statement. The same effect could have been obtained by specifying the TRIPLEX font using the FONT= option in the CHART statement and the F= option in the TITLE2 statement. The resulting Logic Gantt chart is shown in Output 4.19.1.
title f=swiss 'Gantt Example 19'; data holdata; format hol date7.; input hol date7.; datalines; 25dec91 01jan92 ; * schedule the project subject to holidays and weekends; proc cpm data=widgeta holidata=holdata out=savehp date='2dec91'd interval=weekday; tailnode tail; headnode head; duration days; holiday hol; id task dept descrpt; run; * sort the schedule by the early start date ; proc sort; by e_start; run; * set background to white, text to black and font to triplex; goptions cback=white ctext=black ftext=triplex; * set vpos to 50 and hpos to 100; goptions vpos=50 hpos=100; * set up required pattern statements; pattern1 c=green v=s; /* duration of a noncrit. activity */ pattern2 c=green v=e; /* slack time for a noncrit. act. */ pattern3 c=red v=s; /* duration of a critical activity */ pattern4 c=red v=e; /* slack time for a supercrit. act. */ pattern5 c=red v=r2; /* duration of a supercrit. act. */ pattern6 c=cyan v=s; /* actual duration of an activity */ pattern7 c=blue v=x1; /* break due to a holiday */ * plot the Logic Gantt chart using AOA representation; title2 'Logic Gantt Chart: AOA Representation'; proc gantt data=savehp holidata=holdata; chart / holiday=(hol) dur=days increment=7 compress caxis=black cmile=cyan cprec=blue head=head tail=tail; id task; run;Output 4.19.1: Logic Gantt Chart: AOA Representation
* illustrate the minintgv and minoffgv options; title2 'Logic Gantt Chart: AOA Representation, MININTGV=2 and MINOFFGV=2.5'; proc gantt data=savehp holidata=holdata; chart / holiday=(hol) dur=days increment=7 compress caxis=black cmile=cyan cprec=blue head=head tail=tail minintgv=2.0 minoffgv=2.5; id task; run;
Notice that now there is greater distance between vertical segments (corresponding to global verticals), and the horizontal segments leaving bars are longer.
Output 4.19.2: Specifying the MININTGV= and MINOFFGV= Options* illustrate the maxdislv option; title2 'Logic Gantt Chart: AOA Representation and MAXDISLV=.3'; proc gantt data=savehp holidata=holdata; chart / holiday=(hol) dur=days compress caxis=black cmile=cyan cprec=blue head=head tail=tail maxdislv=.3 minintgv=10 maxdate='01feb92'd; id task; run;Output 4.19.3: Specifying the MAXDISLV= Option (I)
title2 'Logic Gantt Chart: AOA Representation and MAXDISLV=2'; proc gantt data=savehp holidata=holdata; chart / holiday=(hol) dur=days compress caxis=black cmile=cyan cprec=blue head=head tail=tail maxdislv=2 minintgv=10 maxdate='01feb92'd; id task; run;Output 4.19.4: Specifying the MAXDISLV= Option (II)
In all of the preceding charts in this example, the connection from the activity, 'Approve Plan', to each of its three successors, 'Drawings', 'Anal. Market', and 'Write Specs', is a 5-segment connection similar to the type illustrated in Figure 4.11. This is caused by backtracking of the activity's global vertical to the successor's local vertical as described in the "Controlling the Layout" section. To transform this connection into a 3-segment connection as shown in Figure 4.10, you need to position the local vertical to the right of the global vertical. The following invocation of PROC GANTT achieves this by specifying MINOFFLV=0.5. Notice that this option affects the positioning of all local verticals on the chart in contrast to the MAXDISLV= option, which affects only those local verticals that are close to global verticals.
* illustrate the minofflv option; title2 'Logic Gantt Chart: AOA Representation and MINOFFLV=.5'; proc gantt data=savehp holidata=holdata; chart / holiday=(hol) dur=days compress caxis=black cmile=cyan cprec=blue head=head tail=tail minofflv=.5 maxdate='01feb92'd; id task; run;Output 4.19.5: Specifying the MINOFFLV= Option
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.