Resources

PERT Assumptions and Calculations (cpm21)

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CPM21                                               */
 /*   TITLE: PERT Assumptions and Calculations (cpm21)           */
 /* PRODUCT: OR                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: CPM                                                 */
 /*   PROCS: CPM                                                 */
 /*    DATA:                                                     */
 /*                                                              */
 /* SUPPORT:                             UPDATE:                 */
 /*     REF: Example 21 from the CPM Chapter (PM User's Guide)   */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

title 'PERT Assumptions and Calculations';
 /* Activity-on-Arc representation of the project
    with three duration estimates */
data widgpert;
   format task $12. ;
   input task & tail head tm tp to;
   dur = (tp + 4*tm + to) / 6;
   datalines;
Approve Plan    1   2    5   7   3
Drawings        2   3   10  11   6
Study Market    2   4    5   7   3
Write Specs     2   3    5   7   3
Prototype       3   5   15  12   9
Mkt. Strat.     4   6   10  11   9
Materials       5   7   10  12   8
Facility        5   7   10  11   9
Init. Prod.     7   8   10  12   8
Evaluate        8   9    9  13   8
Test Market     6   9   14  15  13
Changes         9  10    5   6   4
Production     10  11    0   0   0
Marketing       6  12    0   0   0
Dummy           8   6    0   0   0
;


proc cpm data=widgpert out=sched
     date='1dec03'd;
   tailnode tail;
   headnode head;
   duration dur;
   id task;
   run;

proc sort;
   by e_start;
   run;


  /* specify the device on which you want the chart printed */
 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       */

 title h=2 'PERT Assumptions and Calculations';
 title2 h=1.5 'Project Schedule';
 goptions vpos=50 hpos=80;

 proc gantt graphics data=sched;
    chart / compress tailnode=tail headnode=head
            height=1.8 nojobnum skip=2
            dur=dur increment=7 nolegend;
    id task;
    run;