Resources

Scheduling with Alternate Resources (cpm20)

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CPM20                                               */
 /*   TITLE: Scheduling with Alternate Resources (cpm20)         */
 /* PRODUCT: OR                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: CPM                                                 */
 /*   PROCS: CPM                                                 */
 /*    DATA:                                                     */
 /*                                                              */
 /* SUPPORT:                             UPDATE:                 */
 /*     REF: Example 20 from the CPM Chapter (PM User's Guide)   */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

 /* Activity-on-Node representation of the project */
data widgr20;
   input task $ 1-12 days succ $ 19-30 deseng prodeng engpool;
   datalines;
Approve Plan   5  Drawings      1  1  .
Approve Plan   5  Study Market  1  1  .
Approve Plan   5  Write Specs   1  1  .
Drawings      10  Prototype     1  1  .
Study Market   5  Mkt. Strat.   .  1  .
Write Specs    5  Prototype     1  1  .
Prototype     15  Materials     1  1  1
Prototype     15  Facility      1  1  1
Mkt. Strat.   10  Test Market   .  .  .
Mkt. Strat.   10  Marketing     .  .  .
Materials     10  Init. Prod.   .  .  .
Facility      10  Init. Prod.   .  1  2
Init. Prod.   10  Test Market   .  .  2
Init. Prod.   10  Marketing     .  .  2
Init. Prod.   10  Evaluate      .  .  2
Evaluate      10  Changes       1  .  .
Test Market   15  Changes       .  .  .
Changes        5  Production    1  1  .
Production     0                .  .  .
Marketing      0                .  .  .
;


title 'Scheduling with Alternate Resources';
title2 'Data Set WIDGR20';
proc print;
run;

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

data resin20;
input per date7. otype $ 11-18 resid $ 21-28
      deseng prodeng engpool;
format per date7.;
datalines;
.         restype   .         1  1  1
.         altprty   deseng    .  1  2
.         altprty   prodeng   .  .  1
.         suplevel  .         1  1  .
01dec03   reslevel  .         1  1  4
;


title 'Scheduling with Alternate Resources';
title2 'Data Set RESIN20';
proc print;
   run;

proc cpm date='01dec03'd interval=weekday collapse
         data=widgr20 holidata=holdata resin=resin20
         out=widgo20 resout=widgro20;
   activity task;
   duration days;
   successor succ;
   holiday hol;
   resource deseng prodeng engpool / period=per obstype=otype
                                     delayanalysis
                                     rcs avl;
   run;

title 'Scheduling with Alternate Resources';
title2 'Alternate Resources not used';
proc print data=widgo20 heading=h;
run;

proc cpm date='01dec03'd interval=weekday collapse
         data=widgr20 holidata=holdata resin=resin20
         out=widgalt resout=widralt;
   activity task;
   duration days;
   successor succ;
   holiday hol;
   resource deseng prodeng engpool / period=per obstype=otype
                                     delayanalysis
                                     resid=resid
                                     rcs avl;
run;

title 'Scheduling with Alternate Resources';
title2 'Alternate Resources Reduce Project Completion Time';
proc print data=widgalt;
   run;

/* Invoke CPM with the DELAY=0 option */
proc cpm date='01dec03'd
         interval=weekday collapse
         data=widgr20 resin=resin20 holidata=holdata
         out=widgdsup resout=widrdsup;
   activity task;
   duration days;
   successor succ;
   holiday hol;
   resource deseng prodeng engpool / period=per
                                     obstype=otype
                                     delayanalysis
                                     delay=0
                                     resid=resid
                                     rcs avl;
   run;


title 'Scheduling with Alternate Resources';
title2 'DELAY=0, Supplementary Resources Used instead of Alternate';
proc print data=widgdsup;
run;

proc cpm date='01dec03'd interval=weekday collapse
         data=widgr20 holidata=holdata resin=resin20
         out=widgdalt resout=widrdalt;
   activity task;
   duration days;
   successor succ;
   holiday hol;
   resource deseng prodeng engpool / period=per obstype=otype
                                     delayanalysis
                                     delay=0
                                     resid=resid altbeforesup
                                     rcs avl;
   run;

title 'Scheduling with Alternate Resources';
title2 'DELAY=0, Alternate Resources Used instead of Supplementary';
proc print data=widgdalt;
   run;