Resources

Variable Activity Delay (cpme18)

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: CPME18                                              */
 /*   TITLE: Variable Activity Delay (cpme18)                    */
 /* PRODUCT: OR                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: CPM                                                 */
 /*   PROCS: CPM                                                 */
 /*    DATA:                                                     */
 /*                                                              */
 /* SUPPORT:                             UPDATE:                 */
 /*     REF:                                                     */
 /*     REF: Example 18 from the CPM Chapter (PM User's Guide)   */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/


 /* Activity-on-Arc representation of the project */
data widgr17;
   input task $ 1-12 days tail head deseng mktan prodeng money;
   datalines;
Approve Plan   5   1   2  1  1  1  200
Drawings      10   2   3  1  .  1  100
Study Market   5   2   4  .  1  1  100
Write Specs    5   2   3  1  .  1  150
Prototype     15   3   5  1  .  1  300
Mkt. Strat.   10   4   6  .  1  .  150
Materials     10   5   7  .  .  .  300
Facility      10   5   7  .  .  1  500
Init. Prod.   10   7   8  .  .  .  250
Evaluate      10   8   9  1  .  .  150
Test Market   15   6   9  .  1  .  200
Changes        5   9  10  1  .  1  200
Production     0  10  11  1  .  1  600
Marketing      0   6  12  .  1  .    .
Dummy          0   8   6  .  .  .    .
;


data widgr18;
   set widgr17;
   if prodeng ^= . then adelay = 0;
   else                 adelay = 5;
   run;

title 'Variable Activity Delay';
title2 'Data Set WIDGR18';
proc print;
   run;

data resin17;
   input per & date7. otype $
         deseng mktan prodeng money;
   format per date7.;
   datalines;
.        restype  1 1 1 4
01dec03  reslevel 1 . 1 .
;

data holdata;
   format hol date7. name $9. ;
   input hol & date7. name & ;
   datalines;
25dec03  Christmas
01jan04  New Year
;

proc cpm date='01dec03'd
         interval=weekday
         data=widgr18
         holidata=holdata
         resin=resin17
         out=widgo18
         resout=widgro18;
   tailnode tail;
   duration days;
   headnode head;
   holiday hol;
   resource deseng prodeng mktan money / period=per
                                         obstype=otype
                                         delayanalysis
                                         actdelay=adelay
                                         infeasdiagnostic
                                         rcs avl t_float
                                         cumusage;
   id task;
   run;

title 'Variable Activity Delay';
title2 'Resource Constrained Schedule';
proc print data=widgo18;
run;

title 'Variable Activity Delay';
title2 'Usage Profile';
proc print data=widgro18 heading=h;
   run;

data negdelay;
   set widgo18;
   actdel=-t_float;
   run;

proc cpm date='01dec03'd
         interval=weekday
         data=negdelay
         holidata=holdata
         resin=resin17
         out=widgo18n;
   tailnode tail;
   duration days;
   headnode head;
   holiday hol;
   resource deseng prodeng mktan money / period=per
                                         obstype=otype
                                         delayanalysis
                                         actdelay=actdel
                                         infeasdiagnostic;
   baseline / set=early compare=resource;
   id task;
   run;

title 'Variable Activity Delay';
title2 'Resource Constrained Schedule';
title3 'Activity Delay = - (T_FLOAT)';
proc print data=widgo18n heading=v;
   run;