Resources

Summarizing Resource Utilization (cpme14)

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CPME14                                              */
 /*   TITLE: Summarizing Resource Utilization (cpme14)           */
 /* PRODUCT: OR                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: CPM                                                 */
 /*   PROCS: CPM, FORMAT, CALENDAR, CHART                        */
 /*    DATA:                                                     */
 /*                                                              */
 /* SUPPORT:                             UPDATE:                 */
 /*     REF: Example 14 from the CPM Chapter (PM User's Guide)   */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

 /* Activity-on-Arc representation of the project */

data widgres;
   input task $ 1-12 days tail head engineer;
   datalines;
Approve Plan   5   1   2  2
Drawings      10   2   3  1
Study Market   5   2   4  1
Write Specs    5   2   3  2
Prototype     15   3   5  4
Mkt. Strat.   10   4   6  .
Materials     10   5   7  .
Facility      10   5   7  2
Init. Prod.   10   7   8  4
Evaluate      10   8   9  1
Test Market   15   6   9  .
Changes        5   9  10  2
Production     0  10  11  4
Marketing      0   6  12  .
Dummy          0   8   6  .
;


title 'Summarizing Resource Utilization';
title2 'Activity Data Set';
proc print;
   run;

data holdata;
   format hol date7.;
   input hol date7. name $ 10-18;
   datalines;
25dec03  Christmas
01jan04  New Year
;

title 'Summarizing Resource Utilization';
proc print;
   title2 'Holidays Data Set HOLDATA';
   run;

proc cpm date='1dec03'd interval=weekday
         resourceout=rout data=widgres
         holidata=holdata;
   id task;
   tailnode tail;
   duration days;
   headnode head;
   resource engineer / maxdate='31dec03'd;
   holiday  hol;
   run;

title 'Summarizing Resource Utilization';
title2 'Resource Usage';
proc print;
run;


proc format;                  /* format the Engineer variables */
   picture efmt other='9 ESS Eng';
   picture lfmt other='9 LSS Eng';

   /* print the usage on a calendar */
title 'Summarizing Resource Utilization';
title2 'Resource Usage';
options ps=55 ls=80;
proc calendar legend weekdays
     data=rout holidata=holdata;
   id _time_;
   var  eengineer lengineer;
   format eengineer efmt.
          lengineer lfmt.;
   holiday hol;
   holiname name;
   run;

title 'Summarizing Resource Utilization';
title2 'Resource Usage';
options ps=40 ls=80;
proc chart data=rout;         /* plot the usage in a bar chart */
   hbar _time_/sumvar=eengineer discrete;
run;

title 'Summarizing Resource Utilization';
title2 'Resource Usage';
proc chart data=rout;         /* plot the usage in a bar chart */
   hbar _time_/sumvar=lengineer discrete;
   run;