Software Development Project
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: PMEX10 */
/* TITLE: Software Development Project */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: CPM */
/* PROCS: CPM, NETDRAW, GANTT, SORT, PRINT, GPLOT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 10 of Project Management Examples Book */
/* MISC: */
/* */
/****************************************************************/
goptions border hpos=80 vpos=43
fby=swiss
ftitle=swiss
htitle=2
ftext=swiss
htext=1.5;
pattern1 v=solid c=blue;
pattern2 v=e c=blue;
pattern3 v=solid c=red;
pattern4 v=e c=red;
pattern5 v=x2 c=red;
pattern6 v=solid c=green;
pattern7 v=e c=magenta;
pattern8 v=solid c=magenta;
pattern9 v=x1 c=cyan;
title 'Software Development Project';
data soft;
input id & $20. hours act s1 s2 a b c;
cards;
Plans & Reqts 18 1 2 3 .5 .5 .5
Product Design 20 2 4 5 1 .5 .
Test Plan 20 3 6 7 .5 . .5
Documentation 60 4 9 . . . 1
Code 80 5 8 . 1 . .
Test Data 36 6 8 . . .5 .5
Test Routines 36 7 8 . . .5 .5
Test Product 40 8 9 . .5 1 .
Finish 0 9 . . . . .
;
data softdata;
set soft;
label proj='Project';
label id='Task';
proj='A';
output;
proj='B';
act=1||left(put(act,8.));
if s1 ne . then s1=1||left(put(s1,8.));
if s2 ne . then s2=1||left(put(s2,8.));
output;
run;
data shifts;
format shift1 shift2 time5.;
input shift1 time5. shift2 time5.;
cards;
08:00 08:00
12:00 12:00
13:00 .
17:00 .
;
data softcal;
input _cal_ _sun_ $ _mon_ $ _tue_ $
_wed_ $ _thu_ $ _fri_ $ _sat_ $;
cards;
0 holiday shift1 shift1 shift1 shift1 shift1 shift2
;
data holiday;
format holista holifin datetime13.;
input holista datetime13. @15 holifin datetime13.;
cards;
04jul94:08:00 05jul94:08:00
;
data softres;
input type $ date date7. a b c;
cards;
restype . 1 1 1
reslevel 01jul94 1 1 1
;
proc cpm data=softdata out=softout
holidata=holiday caledata=softcal workdata=shifts
interval=dthour date='01jul94:08:00'dt resin=softres
resout=resusg;
activity act;
successor s1 s2;
duration hours;
id proj id;
holiday holista/holifin=holifin;
resource a b c / noe_start nol_start avp rcp
obstype=type period=date delayanalysis;
baseline / set=resource;
run;
data sofdata1;
merge softdata softout (keep=b_start b_finish);
run;
proc sort data=softout;
by proj s_start;
run;
title2 'Project Schedule';
proc print data=softout;
format s_start s_finish datetime7.;
id proj id;
var hours s_start s_finish a b c r_delay delay_r;
run;
data softres1;
input type $ date date7. res $ a b c;
cards;
restype . . 1 1 1
reslevel 01jul94 . 1 1 1
altrate . a . 2 2
altrate . b 2 . 2
altrate . c 2 2 .
;
proc cpm data=sofdata1 out=softout1
holidata=holiday caledata=softcal workdata=shifts
interval=dthour date='01jul94:08:00'dt resin=softres1
resout=resusg1;
activity act;
successor s1 s2;
duration hours;
id proj id;
holiday holista/holifin=holifin;
resource a b c / noe_start nol_start avp rcp
obstype=type period=date resid=res
delayanalysis;
baseline / compare=resource;
run;
proc sort data=softout1;
by proj s_start;
run;
title2 'Schedule with Alternate Resources';
proc print data=softout1;
format s_start s_finish datetime7.;
id proj id;
var s_start s_finish a b c ua ub uc r_delay delay_r
s_var f_var;
run;
proc gantt graphics data=softout1 caledata=softcal
holidata=holiday workdata=shifts;
id proj id;
chart/markwknd compress nojobnum
dur=hours hconnect
holiday=(holista) holifin=(holifin);
run;
pattern1 v=e;
pattern2 c=red;
title2 'Time-Scaled Network';
proc netdraw graphics data=softout1;
actnet/compress activity=act successor=(s1-s2)
nodefid nolabel id=(id) timescale zone=proj
font=simplex;
run;
pattern1 v=s;
pattern2 c=blue;
data sofdata1;
set sofdata1;
if proj='a' then prty=1;
else prty=2;
run;
proc cpm data=sofdata1 out=softout2
holidata=holiday caledata=softcal workdata=shifts
interval=dthour date='01jul94:08:00'dt resin=softres1
resout=resusg2;
activity act;
successor s1 s2;
duration hours;
id proj id;
holiday holista/holifin=holifin;
resource a b c / noe_start nol_start avp rcp
obstype=type period=date resid=res
delayanalysis rule=actprty actprty=prty;
baseline/compare=resource;
run;
proc sort data=softout2;
by proj s_start;
run;
title2 'Schedule with Project A Prioritized';
proc print data=softout2;
format s_start s_finish datetime7.;
id proj id;
var hours s_start s_finish a b c ua ub uc r_delay delay_r s_var f_var;
run;
symbol1 i=steplj w=2 l=1;
pattern1 v=M3N135;
title2 'Programmer B';
proc gplot data=resusg;
format _time_ datetime7.;
label rb='Utilization';
plot rb * _time_ / vaxis=0,1 vminor=1 areas=1
haxis='01jul94:08:00'dt to '09sep94:17:00'dt
by '336:00't;
run;
quit;
proc gplot data=resusg1;
format _time_ datetime7.;
label rb='Utilization';
plot rb * _time_ / vaxis=0,1 vminor=1 areas=1
haxis='01jul94:08:00'dt to '26aug94:17:00'dt
by '336:00't;
run;
quit;
pattern1 v=s;
data util (keep=util: periods pct:);
set resusg end=lastobs;
retain utila utilb utilc 0;
retain periods 0;
periods=periods +1;
utila =utila + ra;
utilb =utilb + rb;
utilc =utilc + rc;
pcta=utila/periods;
pctb=utilb/periods;
pctc=utilc/periods;
if lastobs;
run;
data util1 (keep=util: periods pct:);
set resusg1 end=lastobs;
retain utila utilb utilc 0;
retain periods 0;
periods=periods +1;
utila =utila + ra;
utilb =utilb + rb;
utilc =utilc + rc;
pcta=utila/periods;
pctb=utilb/periods;
pctc=utilc/periods;
if lastobs;
run;
data util2 (keep=util: periods pct:);
set resusg2 end=lastobs;
retain utila utilb utilc 0;
retain periods 0;
periods=periods +1;
utila =utila + ra;
utilb =utilb + rb;
utilc =utilc + rc;
pcta=utila/periods;
pctb=utilb/periods;
pctc=utilc/periods;
if lastobs;
run;
data utilize;
set util util1 util2;
run;
title2 'Resource Utilization';
proc print data=utilize;
run;
proc cpm data=sofdata1 out=softout3
holidata=holiday caledata=softcal workdata=shifts
interval=dthour date='01jul94:08:00'dt resin=softres1
resout=resusg3;
activity act;
successor s1 s2;
duration hours;
id proj id;
holiday holista/holifin=holifin;
resource a b c / noe_start nol_start avp rcp
obstype=type period=date resid=res
delayanalysis splitflag;
baseline / compare=resource;
run;
proc sort data=softout3;
by proj s_start;
run;
title2 'Schedule with Activity Splitting';
proc print data=softout3;
format s_start s_finish datetime7.;
id proj id;
where proj='B';
var segmt_no hours s_start s_finish a b c ua ub uc r_delay delay_r
s_var f_var;
run;
proc gantt graphics data=softout3 caledata=softcal
holidata=holiday workdata=shifts;
id proj id;
chart/markwknd compress nojobnum
dur=hours hconnect
holiday=(holista) holifin=(holifin);
run;
data util3 (keep=util: periods pct:);
set resusg3 end=lastobs;
retain utila utilb utilc 0;
retain periods 0;
periods=periods +1;
utila =utila + ra;
utilb =utilb + rb;
utilc =utilc + rc;
pcta=utila/periods;
pctb=utilb/periods;
pctc=utilc/periods;
if lastobs;
run;
title2 'Resource Utilization with Activity Splitting';
proc print;
run;