Resource Allocation (cpm15)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: CPM15 */
/* TITLE: Resource Allocation (cpm15) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: CPM */
/* PROCS: CPM */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 15 from the CPM Chapter (PM User's Guide) */
/* MISC: */
/* */
/****************************************************************/
/* Activity-on-Arc representation of the project */
data widgres;
input task $ 1-13 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 .
;
data widgres;
set widgres;
if engineer ^= . then engcost = engineer * 200;
run;
data widgrin;
input per date7. otype $ 11-18 engineer engcost;
format per date7.;
datalines;
. restype 1 2
. suplevel 1 .
01dec03 reslevel 3 40000
26dec03 reslevel 4 .
;
title 'Resource Allocation';
title2 'Data Set WIDGRIN';
proc print;
run;
data holdata;
format hol date7.;
input hol date7. name $ 10-18;
datalines;
25dec03 Christmas
01jan04 New Year
;
proc cpm date='01dec03'd interval=weekday
data=widgres holidata=holdata resin=widgrin
out=widgschd resout=widgrout;
tailnode tail;
duration days;
headnode head;
holiday hol;
resource engineer engcost / period=per obstype=otype
schedrule=shortdur
delayanalysis;
id task;
run;
title 'Resource Allocation';
title2 'Resource Constrained Schedule: Rule = SHORTDUR';
proc print data=widgschd heading=h;
run;
title 'Resource Allocation';
proc print data=widgrout heading=v;
title2 'Usage Profiles for Constrained Schedule: Rule = SHORTDUR';
run;
proc cpm date='01dec03'd
interval=weekday
data=widgres
resin=widgrin
holidata=holdata
out=widgsch2
resout=widgrou2;
tailnode tail;
duration days;
headnode head;
holiday hol;
resource engineer engcost / period=per
obstype=otype
schedrule=lst
delayanalysis;
id task;
run;
title 'Resource Allocation';
title2 'Resource Constrained Schedule: Rule = LST';
proc print data=widgsch2 heading=h;
run;
title 'Resource Allocation';
proc print data=widgrou2 heading=v;
title2 'Usage Profiles for Constrained Schedule: Rule = LST';
run;