Scheduling Around Holidays (cpm8)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: CPM8 */
/* TITLE: Scheduling Around Holidays (cpm8) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: CPM */
/* PROCS: CPM */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 8 from the CPM Chapter (PM User's Guide) */
/* MISC: */
/* */
/****************************************************************/
/* Activity-on-Node representation of the project */
data widget;
input task $ 1-12 days succ1 $ 19-30 succ2 $ 33-44 succ3 $ 47-58;
datalines;
Approve Plan 5 Drawings Study Market Write Specs
Drawings 10 Prototype
Study Market 5 Mkt. Strat.
Write Specs 5 Prototype
Prototype 15 Materials Facility
Mkt. Strat. 10 Test Market Marketing
Materials 10 Init. Prod.
Facility 10 Init. Prod.
Init. Prod. 10 Test Market Marketing Evaluate
Evaluate 10 Changes
Test Market 15 Changes
Changes 5 Production
Production 0
Marketing 0
;
data holidays;
format holiday holifin date7.;
input holiday date8. holifin date8. holidur;
datalines;
24dec03 26dec03 4
01jan04 . .
;
options ls=80;
TITLE 'Scheduling Around Holidays';
title2 'Data Set HOLIDAYS';
proc print;
run;
proc cpm data=widget holidata=holidays
out=saveh date='1dec03'd ;
activity task;
succ succ1 succ2 succ3;
duration days;
holiday holiday / holifin=(holifin);
run;
proc sort data=saveh;
by e_start;
run;
pattern1 c=green v=s; /* duration of a non-critical activity */
pattern2 c=green v=e; /* slack time for a noncrit. activity */
pattern3 c=red v=s; /* duration of a critical activity */
pattern4 c=magenta v=e; /* slack time for a supercrit. activity */
pattern5 c=magenta v=s; /* duration of a supercrit. activity */
pattern6 c=cyan v=s; /* actual duration of an activity */
pattern7 c=black v=e; /* break due to a holiday */
goptions vpos=50 hpos=80 border;
title 'Scheduling Around Holidays';
title2 'Project Schedule';
proc gantt graphics data=saveh holidata=holidays;
chart / compress
height=1.7 nojobnum skip=2
dur=days increment=7
holiday=(holiday) holifin=(holifin);
id task;
run;
proc cpm data=widget holidata=holidays
out=saveh1 date='1dec03'd
interval=day;
activity task;
succ succ1 succ2 succ3;
duration days;
holiday holiday / holidur=(holidur);
run;
title2 'Variable Length Holidays : INTERVAL=DAY';
proc sort data=saveh1;
by e_start;
run;
proc gantt graphics data=saveh1 holidata=holidays;
chart / compress
height=1.7 skip=2
nojobnum
dur=days increment=7
holiday=(holiday) holidur=(holidur) interval=day;
id task;
run;
proc cpm data=widget holidata=holidays
out=saveh2 date='1dec03'd
interval=weekday;
activity task;
succ succ1 succ2 succ3;
duration days;
holiday holiday / holidur=(holidur);
run;
proc sort data=saveh2;
by e_start;
run;
title2 'Variable Length Holidays : INTERVAL=WEEKDAY';
proc gantt graphics data=saveh2 holidata=holidays;
chart / compress
height=1.8 skip=2
nojobnum
dur=days increment=7
holiday=(holiday)
holidur=(holidur)
interval=weekday;
id task;
run;
proc cpm data=widget holidata=holidays
out=saveh3 date='1dec03'd
interval=workday;
activity task;
succ succ1 succ2 succ3;
duration days;
holiday holiday / holidur=(holidur);
run;
proc sort data=saveh3;
by e_start;
run;
title2 'Variable Length Holidays : INTERVAL=WORKDAY';
proc gantt graphics data=saveh3 holidata=holidays;
chart / compress
height=1.8 nojobnum skip=2
dur=days increment=7
holiday=(holiday) holidur=(holidur) interval=workday;
id task;
run;