Specifying PATTERN and SHOWSTATUS (netdre08)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: NETDRE08 */
/* TITLE: Specifying PATTERN and SHOWSTATUS (netdre08) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: NETDRAW */
/* PROCS: CPM, NETDRAW */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 8 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;
/* Set patterns for activities that have started */
data netin;
set widgupd;
if a_start ^= . then style = 3;
run;
goptions hpos=120 vpos=70 border;
pattern1 c=green v=e;
pattern2 c=red v=e;
pattern3 c=ltgray v=s;
title j=l h=3 ' Project: Widget Manufacture';
title2 j=l h=2 ' Date: December 19, 2003';
footnote1 j=l h=2 ' Activity';
footnote2 j=l h=2 ' Start';
footnote3 j=l h=2 ' Finish'
j=r h=2 'PATTERN and SHOWSTATUS Options ';
proc netdraw data=netin graphics;
actnet / act=task
succ=(succ1 succ2 succ3)
ybetween = 10
separatearcs
pcompress
id=(task e_start e_finish)
nodefid nolabel
carcs=cyan
ccritarcs=red
coutline = green
ccritout = red
showstatus
pattern = style
htext=2;
run;