Integrated Assembly Test Project
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: PMEX04 */
/* TITLE: Integrated Assembly Test Project */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: CPM */
/* PROCS: CPM,PRINT,NETDRAW,GANTT,SORT,GCHART,GPLOT,TRANSPOSE */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 4 of Project Management Examples Book */
/* MISC: Project Management Journal, April 1988, p. 32 */
/* */
/****************************************************************/
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 'Integrated Assembly Test Project';
data iatdata;
format id $25.;
input activity $ succ $ succ2 $ lag $ lag2 $
dur id &;
cards;
S PD . SS_0 . 0 Start
PD PDR . FS_0 . 105 Preliminary Design
PDR FD . FS_0 . 21 Prelim Design Review
FD FDR PM FS_0 SS_126 168 Final Design
PM FC . SS_63 . 126 Procure Material
FDR FP FC FS_0 FS_0 21 Final Design Review
FP FRR . FS_0 . 273 Facility Preparation
FC DA . FS_-5 . 273 Fabricate Components
DA IA . FS_0 . 26 Deliver Assembly
FRR IA DA FS_0 FF_0 21 Facil Readiness Rvw
IA RR . FS_0 . 42 Install Assembly
RR T . FS_0 . 21 Readiness Review
T TV . FF_35 . 126 Test
TV . . . . 63 Test Validation
;
pattern1 v=e;
title2 'Initial Network';
proc netdraw graphics data=iatdata;
actnet/activity=activity succ=(succ succ2) duration=dur id=(id)
nolabel compress font=simplex;
run;
pattern1 v=s;
proc cpm data=iatdata out=iout
date='01oct93'd interval=day;
activity activity;duration dur;id id;
successor succ succ2/lag=(lag lag2);
run;
proc sort data=iout;
by e_start;
run;
title2 'Initial Schedule';
proc gantt graphics data=iout;
chart/mininterval=week compress
skip=2 duration=dur;
id id;
run;
data dates;
format date date7.;
input date date7. align $;
cards;
. .
. .
. .
. .
. .
30SEP94 FLE
01OCT94 SGE
. .
30SEP95 FLE
. .
. .
. .
01OCT95 SGE
. .
;
data iatdata;
merge iatdata dates;
run;
proc cpm data=iatdata out=iout1
date='01oct93'd interval=day xfervars;
activity activity;duration dur;id id;
successor succ succ2/lag=(lag lag2);
aligndate date;
aligntype align;
run;
proc sort data=iout1;
by e_start;
run;
title2 'Incorporating Date Constraints';
proc gantt graphics data=iout1;
chart/mininterval=week compress ref='01oct93'd '01oct94'd
'01oct95'd lref=2 reflabel skip=2 duration=dur;
id id;
run;
title2 'Gantt Chart with Logic';
proc gantt graphics data=iout1 precdata=iout1;
chart/mininterval=month compress ref='01oct93'd '01oct94'd
'01oct95'd lref=2 reflabel act=activity succ=(succ succ2)
lag=(lag lag2) skip=2 scale=6 duration=dur;
id id;
run;
data icosts;
input total;
cards;
0
500
150
300
760
150
1100
1400
340
150
250
150
900
500
;
data iatcost;
merge iatdata icosts;
if dur>0 then costper=total/dur;
else costper=0;
run;
proc cpm data=iatcost out=iout2 date='01oct93'd
interval=day resout=costusg;
activity activity;
duration dur;
id id;
successor succ succ2/lag=(lag lag2);
aligndate date;
aligntype align;
resource costper;
run;
data basecost (keep=_time_ bcws cumbcws);
set costusg;
retain cumbcws 0;
bcws=ecostper;
cumbcws=cumbcws + bcws;
run;
data actual;
input activity $ @6 as date7. @15 af date7. actcost pct;
format as af date7.;
cards;
S 01oct93 01oct93 0 .
PD 01oct93 29jan94 6.0 .
PDR 30jan94 19feb94 8.2 .
FD 20feb94 10sep94 3.1 .
PM 10aug94 . 6.4 40
FDR 11sep94 . 8.0 80
;
data iatupd;
merge iatcost actual;
if actcost ne . then newcost=actcost;
else newcost=costper;
run;
proc cpm data=iatupd out=updsched date='01oct93'd
interval=day resout=updcost;
activity activity;
duration dur;
id id;
successor succ succ2/lag=(lag lag2);
aligndate date;
aligntype align;
resource costper actcost newcost;
actual/a_start=as a_finish=af timenow='01oct94'd
pctcomp=pct;
run;
title2 'Schedule Updated with Actual Information';
proc print data=updsched;
var id dur costper status a_dur actcost;
run;
proc sort data=updsched;
by e_start;
run;
proc gantt data=updsched graphics;
chart/mininterval=week compress
timenow='01oct94'd combine duration=dur
skip=2;
id id;
run;
data upcost (keep=_time_ bcwp acwp cumbcwp cumacwp eac cumeac);
set updcost;
retain cumbcwp 0 cumacwp 0 cumeac 0;
if _time_ < '01oct94'd then do;
bcwp=ecostper;
acwp=eactcost;
cumbcwp + bcwp;
cumacwp + acwp;
end;
else do;
cumbcwp=.;
cumacwp=.;
end;
eac=enewcost;
cumeac + eac;
run;
data costs;
merge basecost upcost;
run;
data mnthcost;
set costs;
month=_time_;
year=_time_;
format month monname3.;
format year year.;
format bcws acwp dollar4.;
run;
data cost94;
set mnthcost;
if _time_ < '01oct94'd;
run;
axis3 label=none;
title2 'Budgeted Monthly Expenditures - FY94';
proc gchart data=cost94;
vbar month/type=sum sumvar=bcws discrete
raxis=0 to 500 by 100 minor=9 autoref
maxis=axis3 gaxis=axis3
group=year nozero width=5;
label bcws='Thousands';
run;
quit;
title2 'Actual Monthly Expenditures - FY94';
proc gchart data=cost94;
vbar month/type=sum sumvar=acwp discrete
raxis=0 to 500 by 100 minor=9 autoref
maxis=axis3 gaxis=axis3
group=year nozero width=5;
label acwp='Thousands';
run;
quit;
data costplot (keep=date dollars id);
set costs;
format date date7.;
date=_time_;
if cumbcws ne . then do;
dollars=cumbcws;
id=1;
output;
end;
if cumbcwp ne . then do;
dollars=cumbcwp;
id=2;
output;
end;
if cumacwp ne . then do;
dollars=cumacwp;
id=3;
output;
end;
if cumeac ne . then do;
dollars=cumeac;
id=4;
output;
end;
run;
legend1 frame
value=(f=swiss justify=l 'BCWS' 'BCWP' 'ACWP' 'EAC')
label=(f=swiss 'Legend:');
axis1 width=2
order=('01oct93'd to '01oct96'd by year)
value=(f=swiss)
label=none;
axis2 width=2
value=(f=swiss)
label=(f=swiss);
symbol1 i=join w=2 l=1;
symbol2 i=join w=2 l=2;
symbol3 i=join w=2 l=3 c=cyan;
symbol4 i=join w=2 l=34 c=magenta;
data budcomp (keep=_time_ bac);
set basecost end=lastobs;
bac=cumbcws;
if lastobs;
run;
data actcomp (keep=_time_ eac);
set upcost end=lastobs;
eac=cumeac;
if lastobs;
run;
data complete (keep=_time_ bac eac);
merge budcomp actcomp;
run;
%annomac;
data anno1;
%dclanno;
%system(2,2,4)
set complete;
length lab $16.;
x1=_time_ + 25;
y1=bac;
y2=eac;
lab=put('$'||left(bac)||' K',$10.);
%label(x1,y1,lab,*,0,0,1.2,duplex,C);
lab=put('$'||left(eac)||' K',$10.);
%label(x1,y2,lab,*,0,0,1.2,duplex,C);
run;
title2 'Earned Value Analysis';
proc gplot data=costplot anno=anno1;
plot dollars * date = id/
hminor=11
href='01oct94'd
legend=legend1
haxis=axis1
vaxis=axis2;
format dollars dollar6.;
label dollars='Thousands';
run;
quit;
data now (keep=_time_ cumbcwp cumbcws cumacwp costvar schvar);
set costs;
if _time_='30sep94'd;
costvar=(cumbcwp-cumacwp)/cumbcwp;
schvar=(cumbcwp-cumbcws)/cumbcws;
run;
data eva (drop=_time_);
merge now complete;
compvar=(bac-eac)/bac;
progcomp=cumbcwp/bac;
label bac='Budget at Completion (BAC)';
label eac='Estimate at Completion (EAC)';
label cumbcwp='BCWP';
label cumbcws='BCWS';
label cumacwp='ACWP';
label costvar='Cost Variance %';
label schvar='Schedule Variance %';
label compvar='Estimate at Completion Variance %';
label progcomp='Program Completed %';
run;
proc transpose data=eva out=eva1;
var progcomp cumbcwp cumbcws cumacwp costvar schvar bac eac compvar;
run;
proc print label data=eva1;
id _label_;
var col1;
label _label_='Statistic';
label col1='Value';
run;