Resources

Integrated Assembly Project (evme01)

/***************************************************************/
/*                                                             */
/*          S A S   S A M P L E   L I B R A R Y                */
/*                                                             */
/*    NAME: evme01                                             */
/*   TITLE: Integrated Assembly Project (evme01)               */
/* PRODUCT: OR                                                 */
/*  SYSTEM: ALL                                                */
/*    KEYS: OR                                                 */
/*   PROCS: CPM, Sort, Earned Value Macros                     */
/*    DATA:                                                    */
/*                                                             */
/* SUPPORT:                             UPDATE:                */
/*     REF:                                                    */
/*    MISC: Example 1 from the Earned Value Management Macros  */
/*          chapter of Project Management.                     */
/*                                                             */
/***************************************************************/

/* Provide baseline schedule input */

data iatdata;
     format id $25.;
     format date date7.;
     input activity $ succ $ succ2 $ lag $ lag2 $
     dur date date7. align $ id &;
datalines;
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 30SEP10 FLE Final Design Review
FP   FRR  .   FS_0   .      273 01OCT10 SGE Facility Preparation
FC   DA   .   FS_-5  .      273 .       .   Fabricate Components
DA   IA   .   FS_0   .       26 30SEP11 FLE 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 01OCT11 SGE Test
TV   .    .   .      .       63 .       .   Test Validation
;


/* Produce schedule */

proc cpm data=iatdata out=iout1
    date='01oct09'd
    interval=day xfervars;
    activity activity;
    duration dur;
    id id;
    successor succ succ2/lag=(lag lag2);
    aligndate date;
    aligntype align;
run;

/* Rename and label variables */

data iout1;
    set iout1;
    keep activity dur id e_start e_finish;
    rename e_start = start;
    rename e_finish = finish;
    rename dur = duration;
    label dur=Duration;
    label id=Description;
    label activity=Activity;
    label e_start=Planned Start;
    label e_finish=Planned Finish;
run;

title 'Integrated Assembly Test Project';
title2 'Initial Schedule';
proc print data=iout1 label;
run;

/* Baseline costs */

data icosts;
     input total;
datalines;
0
500
150
300
760
150
1100
1400
340
150
250
150
900
500
;

/* Convert costs to rates, and associate these rates with
   activities */

data iatcost;
     merge iatdata icosts;
     if dur>0 then rate=total/dur;
     else rate=0;
run;

title;
title2 'Budgeted Costs';
proc print data=iatcost label;
    label activity=Activity;
    label rate=Rate;
    var activity rate;
run;

/* Compute daily planned value */

%eva_planned_value(
    plansched=iout1,
    activity=activity,
    start=start,
    finish=finish,
    duration=duration,
    budgetcost=iatcost,
    rate=rate
);

proc print data=pv label;
     title 'Daily Planned Value';
     var _time_ _PV_Rate_;
run;

/* Provide updated schedule inputs */

data actual;
   input activity $8. as : date7. af : date7. actcost pctcomp;
   format as af date7.;
   datalines;
S       01oct09 01oct09  0    100
PD      01oct09 29jan10  6.0  100
PDR     30jan10 19feb10  8.2  100
FD      20feb10 10sep10  3.1  100
PM      10aug10    .     6.4  40
FDR     11sep10    .     8.0  80
;

title;
title2 'Status';
proc print data=actual label;
    label activity=Activity;
    label as=Actual Start;
    label af=Actual Finish;
    label actcost=Actual Rate;
    label pctcomp=Pct. Comp.;
run;

/* Integrate actual progress and rates with initial schedule
   inputs */

data order;
    set iatcost;
    retain _seqno_ 0;
    _seqno_ = _seqno_ + 1;
run;

proc sort data=order;
   by activity;
run;

proc sort data=actual;
   by activity;
run;

data iatupd;
   merge actual order;
   by activity;
   drop rate;
   rename newcost=rate;
   if actcost ne . then newcost=actcost;
   else newcost=rate;
run;

proc sort data=iatupd;
   by _seqno_;
run;

data iatupd;
   set iatupd;
   drop _seqno_;
run;

/* Produce updated schedule */

proc cpm data=iatupd out=updsched date='01oct09'd
   interval=day;
   activity activity;
   duration dur;
   id id rate pctcomp;
   successor succ succ2/lag=(lag lag2);
   aligndate date;
   aligntype align;
   actual / a_start=as a_finish=af timenow='01oct10'd
            pctcomp=pctcomp;
run;

/* Rename and label variables */

data updsched;
   set updsched;
   keep activity a_dur id e_start e_finish pctcomp;
   rename e_start = start;
   rename e_finish = finish;
   rename a_dur = duration;
   label activity=Activity;
   label id=Description;
   label a_dur=Actual Duration;
   label e_start=Start;
   label e_finish=Finish;
   label pctcomp=Pct. Comp.;
run;

title2 'Updated Schedule';
proc print data=updsched label;
run;

/* Produce daily earned value */

%eva_earned_value(
    revisesched=updsched,
    activity=activity,
    start=start,
    finish=finish,
    actualcost=iatupd,
    rate=rate
);

proc print data=ev label;
    title 'Daily Earned Value and Revised Cost';
    var _time_ _EV_Rate_ _AC_Rate_;
run;

/* Produce metrics */

%eva_metrics(
    timenow='30sep10'd,
    acronyms=long
);

/* Metrics by task */

%eva_task_metrics(
    plansched=iout1,
    revisesched=updsched,
    activity=activity,
    start=start,
    finish=finish,
    pctcomp=pctcomp,
    budgetcost=iatcost,
    actualcost=iatupd,
    rate=rate,
    timenow='30sep10'd,
    acronyms=long
);

%evg_cost_plot(acronyms=long);

%evg_schedule_plot;

%evg_index_plot;

%evg_variance_plot;

%evg_gantt_chart(
    plansched=iout1,
    revisesched=updsched,
    activity=activity,
    start=start,
    finish=finish,
    duration=duration,
    timenow='30sep10'd,
    id=pv ev ac cv cvp sv svp,
    height=3,
    scale=1.5
);