Resources

Precedence Gantt Chart (cpme05)

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CPME05                                              */
 /*   TITLE: Precedence Gantt Chart (cpme05)                     */
 /* PRODUCT: OR                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: CPM                                                 */
 /*   PROCS: CPM, GANTT                                          */
 /*    DATA:                                                     */
 /*                                                              */
 /* SUPPORT:                             UPDATE:                 */
 /*     REF: Example 5 from the CPM Chapter (PM User's Guide)    */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

 /* Activity-on-Arc representation of the project */



data widgaoa;
   input task $ 1-12 days tail head;
   datalines;
Approve Plan   5   1   2
Drawings      10   2   3
Study Market   5   2   4
Write Specs    5   2   3
Prototype     15   3   5
Mkt. Strat.   10   4   6
Materials     10   5   7
Facility      10   5   7
Init. Prod.   10   7   8
Evaluate      10   8   9
Test Market   15   6   9
Changes        5   9  10
Production     0  10  11
Marketing      0   6  12
Dummy          0   8   6
;


data details;
   input task $ 1-12 dept $ 15-27 descrpt $ 30-59;
   label dept = "Department"
         descrpt = "Activity Description";
   datalines;
Dev. Concept  Planning       Finalize and Approve Plan
Drawings      Engineering    Prepare Drawings
Study Market  Marketing      Analyze Potential Markets
Write Specs   Engineering    Write Specifications
Prototype     Engineering    Build Prototype
Mkt. Strat.   Marketing      Develop Marketing Concept
Materials     Manufacturing  Procure Raw Materials
Facility      Manufacturing  Prepare Manufacturing Facility
Init. Prod.   Manufacturing  Initial Production Run
Evaluate      Testing        Evaluate Product In-House
Test Market   Testing        Test Product in Sample Market
Changes       Engineering    Engineering Changes
Production    Manufacturing  Begin Full Scale Production
Marketing     Marketing      Begin Full Scale Marketing
Dummy                        Production Milestone
;

data widgeta;
   merge widgaoa details;
   run;



proc cpm data=widgeta out=save
     date='1dec03'd interval=day;
   tailnode tail;
   headnode head;
   duration days;
   id task descrpt;
   run;

proc sort;
   by e_start;
   run;
 pattern1 c=green v=s;     /* duration of a non-critical activity   */
 pattern2 c=green v=e;     /* slack time for a noncrit. activity    */
 pattern3 c=red   v=s;     /* duration of a critical activity       */



* specify the device on which you want the chart printed;

goptions vpos=50 hpos=80 border;

title 'Precedence Gantt Chart';
title2 'Early and Late Start Schedule';

proc gantt graphics data=save;
   chart / compress tailnode=tail headnode=head
           height=2 nojobnum skip=2
           cprec=cyan cmile=magenta
           caxis=black
           dur=days increment=7 nolegend;
   id descrpt;
   run;