Resources

Time Scaled Network Diagram (netdre09)

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: NETDRE09                                            */
/*   TITLE: Time Scaled Network Diagram (netdre09)              */
/* PRODUCT: OR                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: NETDRAW                                             */
/*   PROCS: CPM, NETDRAW                                        */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT:                             UPDATE:                 */
/*     REF: Example 9 from the NETDRAW Chapter (PM User's Guide)*/
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

 /* Activity-on-Node representation of the project */
data widget;
   format task $12. succ1-succ3 $12.;
   input task & days succ1 & succ2 & succ3 & ;
   datalines;
Approve Plan   5  Drawings      Study Market  Write Specs
Drawings      10  Prototype     .             .
Study Market   5  Mkt. Strat.   .             .
Write Specs    5  Prototype     .             .
Prototype     15  Materials     Facility      .
Mkt. Strat.   10  Test Market   Marketing     .
Materials     10  Init. Prod.   .             .
Facility      10  Init. Prod.   .             .
Init. Prod.   10  Test Market   Marketing     Evaluate
Evaluate      10  Changes       .             .
Test Market   15  Changes       .             .
Changes        5  Production    .             .
Production     0  .             .             .
Marketing      0  .             .             .
;

data holidays;
   format holiday holifin date7.;
   input holiday & date7. holifin & date7. holidur;
   datalines;
24dec03  26dec03  4
01jan04  .        .
;

* actual schedule at timenow = 19dec03;
data actual;
   format task $12. sdate fdate date7.;
   input task & sdate & date7. fdate & date7. pctc rdur;
   datalines;
Approve Plan  01dec03  05dec03  .    .
Drawings      06dec03  16dec03  .    .
Study Market  05dec03  .        100  .
Write Specs   07dec03  12dec03  .    .
Prototype     .        .        .    .
Mkt. Strat.   10dec03  .        .    3
Materials     .        .        .    .
Facility      .        .        .    .
Init. Prod.   .        .        .    .
Evaluate      .        .        .    .
Test Market   .        .        .    .
Changes       .        .        .    .
Production    .        .        .    .
Marketing     .        .        .    .
;

* merge the predicted information with network data;
data widgact;
   merge  actual widget;
   run;

* estimate schedule based on actual data;
proc cpm data=widgact holidata=holidays
         out=widgupd date='1dec03'd;
   activity task;
   succ     succ1 succ2 succ3;
   duration days;
   holiday  holiday / holifin=(holifin);
   actual / as=sdate af=fdate timenow='19dec03'd
            remdur=rdur pctcomp=pctc showfloat;
   run;

pattern1 v=e c=green;
pattern2 v=e c=red;

title  j=l h=3 ' Project: Widget Manufacture';
title2 j=l h=2 ' Date: December 19, 2003';
footnote j=l h=2 ' Task Name / Early Finish Within Node'
         j=r h=2 'Time Scaled: Default Alignment ';
proc netdraw data=widgupd graphics;
   actnet / act=task
            succ=(succ1 succ2 succ3)
            ybetween = 8
            separatearcs
            novcenter
            id=(task e_finish) nodefid
            nolabel
            showstatus
            carcs=darkblue
            ccritarcs=red
            vmargin=5
            hmargin=5
            timescale
            htext=2  pcompress
            hpages=2 vpages=1
            nopagenumber;
   run;

footnote j=l h=2 ' Task Name / Late Finish Within Node'
         j=r h=2 'Time Scaled: Align = Late Start ';
proc netdraw data=widgupd graphics;
   actnet / act=task
            succ=(succ1 succ2 succ3)
            ybetween = 10
            separatearcs
            pcompress
            novcenter
            id=(task l_finish) nodefid
            nolabel
            boxwidth=5
            showstatus
            carcs=darkcyan
            ccritarcs=red
            vmargin=10
            align=l_start
            frame
            autoref
            lref=33
            cref=darkcyan
            showbreak
            htext=2;
   run;