Chapter Contents
Chapter Contents
The CPM Procedure

Example 2.12: Activity Time Constraints

Often, in addition to a project start date or a project finish date, there may be other time constraints imposed selectively on the activities in the project. The ALIGNDATE and ALIGNTYPE statements enable you to add various types of time constraints on the activities. In this example, the data set WIDGET12 displayed in Output 2.12.1 contains two variables, adate and atype, which enable you to specify these restrictions. For example, the activity `Drawings' has an `feq' (Finish Equals) constraint, requiring it to finish by the 16th of December. The activity `Test Market' has a mandatory start date imposed on it.

Output 2.12.1: Activity Data Set WIDGET12

Activity Time Constraints
Activity data set

Obs task days succ1 succ2 succ3 adate atype
1 Approve Plan 5 Drawings Anal. Market Write Specs .  
2 Drawings 10 Prototype     16DEC91 feq
3 Anal. Market 5 Mkt. Strat.     .  
4 Write Specs 5 Prototype     16DEC91 sge
5 Prototype 15 Materials Facility   .  
6 Mkt. Strat. 10 Test Market Marketing   .  
7 Materials 10 Init. Prod.     .  
8 Facility 10 Init. Prod.     .  
9 Init. Prod. 10 Test Market Marketing Evaluate .  
10 Evaluate 10 Changes     28FEB92 fle
11 Test Market 15 Changes     17FEB92 ms
12 Changes 5 Production     .  
13 Production 0       .  
14 Marketing 0       .  

The following statements are needed to schedule the project subject to these restrictions. The option XFERVARS in the PROC CPM statement causes CPM to transfer all variables that were used in the analysis to the Schedule data set. Output 2.12.2 shows the resulting schedule.

   proc cpm data=widget12 date='2dec91'd
        xfervars interval=weekday;
      activity task;
      successor succ1 succ2 succ3;
      duration days;
      aligndate adate;
      aligntype atype;

   options ls=90;
   title 'Activity Time Constraints';
   title2 'Aligned Schedule';
   proc print;
      id task;
      var adate atype e_: l_: t_float f_float;

Output 2.12.2: Aligned Schedule

Activity Time Constraints
Aligned Schedule

Approve Plan .   02DEC91 06DEC91 26NOV91 02DEC91 -4 -4
Drawings 16DEC91 feq 09DEC91 20DEC91 03DEC91 16DEC91 -4 -4
Anal. Market .   09DEC91 13DEC91 27JAN92 31JAN92 35 0
Write Specs 16DEC91 sge 16DEC91 20DEC91 23DEC91 27DEC91 5 0
Prototype .   23DEC91 10JAN92 30DEC91 17JAN92 5 0
Mkt. Strat. .   16DEC91 27DEC91 03FEB92 14FEB92 35 30
Materials .   13JAN92 24JAN92 20JAN92 31JAN92 5 0
Facility .   13JAN92 24JAN92 20JAN92 31JAN92 5 0
Init. Prod. .   27JAN92 07FEB92 03FEB92 14FEB92 5 0
Evaluate 28FEB92 fle 10FEB92 21FEB92 17FEB92 28FEB92 5 5
Test Market 17FEB92 ms 17FEB92 06MAR92 17FEB92 06MAR92 0 0
Changes .   09MAR92 13MAR92 09MAR92 13MAR92 0 0
Production .   16MAR92 16MAR92 16MAR92 16MAR92 0 0
Marketing .   10FEB92 10FEB92 16MAR92 16MAR92 25 25

Note that the MS and MF constraints are mandatory and override any precedence constraints; thus, both the late start and early start times for the activity `Test Market' coincide with February 17, 1992. However, the other types of constraints are not mandatory; they are superceded by any constraints imposed by the precedence relationships. In other words, neither the early start nor the late start schedule violate precedence constraints. Thus, even though the activity `Drawings' is required to finish on the 16th of December (by the `fle' constraint), the early start schedule causes it to finish on the 20th of December because of its predecessor's schedule. This type of inconsistency is indicated by the presence of negative floats for some of the activities alerting you to the fact that if some of these deadlines are to be met, these activities must start earlier than the early start schedule. Such activities are called supercritical.

Chapter Contents
Chapter Contents

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.