Specifying the Logic Options (gantt19)
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: GANTT19 */
/* TITLE: Specifying the Logic Options (gantt19) */
/* PRODUCT: OR */
/* SYSTEM: ALL */
/* KEYS: GANTT */
/* PROCS: CPM, SORT, GANTT */
/* DATA: */
/* */
/* SUPPORT: UPDATE: */
/* REF: Example 19 in the GANTT Chapter (PM User's Guide) */
/* MISC: Specifying the MAXDISLV=, MININTGV=, MINOFFGV=, and */
/* MINOFFLV= Options. */
/* */
/****************************************************************/
title h=1.75 'Gantt Example 19';
/* Activity-on-Arc representation of the project */
data widgaoa;
format task $12.;
input task & days tail head;
datalines;
Approve Plan 5 1 2
Drawings 10 2 3
Study Market 5 2 4
Write Specs 5 2 3
Prototype 15 3 5
Mkt. Strat. 10 4 6
Materials 10 5 7
Facility 10 5 7
Init. Prod. 10 7 8
Evaluate 10 8 9
Test Market 15 6 9
Changes 5 9 10
Production 0 10 11
Marketing 0 6 12
Dummy 0 8 6
;
data details;
format task $12. dept $13. descrpt $30.;
input task & dept & descrpt & ;
label dept = "Department"
descrpt = "Activity Description";
datalines;
Approve Plan Planning Finalize and Approve Plan
Drawings Engineering Prepare Drawings
Study Market Marketing Analyze Potential Markets
Write Specs Engineering Write Specifications
Prototype Engineering Build Prototype
Mkt. Strat. Marketing Develop Marketing Concept
Materials Manufacturing Procure Raw Materials
Facility Manufacturing Prepare Manufacturing Facility
Init. Prod. Manufacturing Initial Production Run
Evaluate Testing Evaluate Product In-House
Test Market Testing Mail Product to Sample Market
Changes Engineering Engineering Changes
Production Manufacturing Begin Full Scale Production
Marketing Marketing Begin Full Scale Marketing
Dummy . Production Milestone
;
data widgeta;
merge widgaoa details;
run;
data holdata;
format hol date7.;
input hol & date7.;
datalines;
25dec03
01jan04
;
* schedule the project subject to holidays and weekends;
proc cpm data=widgeta holidata=holdata out=savehp
date='1dec03'd interval=weekday;
tailnode tail;
headnode head;
duration days;
holiday hol;
id task dept descrpt;
run;
* sort the schedule by the early start date;
proc sort;
by e_start;
run;
* set background to white and text to black;
goptions cback=white ctext=black;
* set additional graphics options;
goptions vpos=50 hpos=100 htext=1.1;
* set up required pattern statements;
pattern1 c=green v=s; /* duration of a noncrit. activity */
pattern2 c=green v=e; /* slack time for a noncrit. act. */
pattern3 c=red v=s; /* duration of a critical activity */
pattern4 c=red v=e; /* slack time for a supercrit. act. */
pattern5 c=red v=r2; /* duration of a supercrit. act. */
pattern6 c=cyan v=s; /* actual duration of an activity */
pattern7 c=blue v=x1; /* break due to a holiday */
* plot the logic Gantt chart using AOA representation;
title2 h=1.25 'Logic Gantt Chart: AOA Representation';
proc gantt graphics data=savehp holidata=holdata;
chart / compress cprec=blue caxis=black cmile=cyan
increment=7 height=1.5
dur=days holiday=(hol)
head=head tail=tail;
id task;
run;
goptions htext=1.4;
* illustrate the minintgv and minoffgv options;
title2 h=1.25
'Logic Gantt Chart: AOA Representation, MININTGV=2 and MINOFFGV=2.5';
proc gantt graphics data=savehp holidata=holdata;
chart / dur=days holiday=(hol) compress increment=7
cprec=blue caxis=black cmile=cyan
head=head tail=tail
minintgv=2.0 minoffgv=2.5;
id task;
run;
goptions htext=1.2;
* illustrate the maxdislv option;
title2 h=1.25 'Logic Gantt Chart: AOA Representation and MAXDISLV=.3';
proc gantt graphics data=savehp holidata=holdata;
chart / compress cprec=blue caxis=black cmile=cyan
dur=days holiday=(hol)
head=head tail=tail
maxdislv=.3 minintgv=10
maxdate='01feb04'd;
id task;
run;
title2 h=1.25 'Logic Gantt Chart: AOA Representation and MAXDISLV=2';
proc gantt graphics data=savehp holidata=holdata;
chart / compress cprec=blue caxis=black cmile=cyan
dur=days holiday=(hol)
head=head tail=tail
maxdislv=2 minintgv=10
maxdate='01feb04'd;
id task;
run;
* illustrate the minofflv option;
title2 h=1.25
'Logic Gantt Chart: AOA Representation and MINOFFLV=.5';
proc gantt graphics data=savehp holidata=holdata;
chart / compress cprec=blue caxis=black cmile=cyan
dur=days holiday=(hol)
head=head tail=tail
minofflv=.5
maxdate='01feb04'd;
id task;
run;