Chapter Contents |
Previous |
Next |
The GANTT Procedure |
Notice that each bar is drawn using the pattern identified by the _PATTERN variable in the SCHED data set. In the absence of the _PATTERN variable, the pattern associated with the resource-constrained schedule would have been used for all the bars. This is the same mechanism that produced the split segments in Example 4.13 although the SEGMT_NO variable in this case was automatically created by the CPM procedure.
title1 'Gantt Example 24'; title2 f=swiss 'Schedule of Cities Visited by Salesperson'; data sched; input person : $ city $9-20 from : date7. to : date7. _pattern; format from to date7.; datalines; Clark New York 01May95 03May95 10 Clark Boston 06May95 09May95 11 Clark Wisconsin 12May95 15May95 12 Clark Chicago 18May95 24May95 13 Clark New York 28May95 02Jun95 10 Stevens Charlotte 02May95 04May95 14 Stevens Atlanta 08May95 10May95 15 Stevens Dallas 12May95 15May95 16 Stevens Denver 17May95 20May95 17 Stevens Nashville 27May95 02Jun95 18 Stevens Charlotte 04Jun95 06Jun95 14 Jackson Los Angeles 01May95 08May95 19 Jackson Las Vegas 11May95 18May95 20 Jackson Portland 21May95 23May95 21 Jackson Seattle 25May95 29May95 22 Rogers Miami 02May95 07May95 23 Rogers Tampa 11May95 15May95 24 Rogers New Orleans 18May95 24May95 25 Rogers Houston 28May95 01Jun95 26 ; /* Sort data by person, from */ proc sort data=sched; by person from; run; /* Add Segmt_no variable */ data newsched; set sched; retain segmt_no; if person ne lag(person) then segmt_no=1; else segmt_no = segmt_no + 1; output; ; proc print data=sched; run; data labels; _y=-1; _lvar="city"; _xvar="from"; _flabel="swiss"; _hlabel=0.75; _yoffset = -.2; ; pattern1 v=s r=25; proc gantt data=newsched labdata=labels; id person; chart / ss=from sf=to compress labsplit='.' scale=2 nolegend nojobnum skip=3 font=swiss ref='01may95'd to '30jun95'd by week ; run;Output 4.24.1: NEWSCHED Data Set
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.