The CPM Procedure

Example 4.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 4.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 on the 15th of December. The activity 'Test Market' has a mandatory start date imposed on it.

Output 4.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 Study Market Write Specs .  
2 Drawings 10 Prototype     15DEC03 feq
3 Study Market 5 Mkt. Strat.     .  
4 Write Specs 5 Prototype     15DEC03 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     27FEB04 fle
11 Test Market 15 Changes     16FEB04 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 4.12.2 shows the resulting schedule.

proc cpm data=widget12 date='1dec03'd
     xfervars interval=weekday;
   activity task;
   successor succ1 succ2 succ3;
   duration days;
   aligndate adate;
   aligntype atype;
   run;
   
  
title 'Activity Time Constraints';
title2 'Aligned Schedule';
proc print;
   id task;
   var adate atype e_: l_: t_float f_float;
   run;

Output 4.12.2: Aligned Schedule

Activity Time Constraints
Aligned Schedule

task adate atype E_START E_FINISH L_START L_FINISH T_FLOAT F_FLOAT
Approve Plan .   01DEC03 05DEC03 25NOV03 01DEC03 -4 -4
Drawings 15DEC03 feq 08DEC03 19DEC03 02DEC03 15DEC03 -4 -4
Study Market .   08DEC03 12DEC03 26JAN04 30JAN04 35 0
Write Specs 15DEC03 sge 15DEC03 19DEC03 22DEC03 26DEC03 5 0
Prototype .   22DEC03 09JAN04 29DEC03 16JAN04 5 0
Mkt. Strat. .   15DEC03 26DEC03 02FEB04 13FEB04 35 30
Materials .   12JAN04 23JAN04 19JAN04 30JAN04 5 0
Facility .   12JAN04 23JAN04 19JAN04 30JAN04 5 0
Init. Prod. .   26JAN04 06FEB04 02FEB04 13FEB04 5 0
Evaluate 27FEB04 fle 09FEB04 20FEB04 16FEB04 27FEB04 5 5
Test Market 16FEB04 ms 16FEB04 05MAR04 16FEB04 05MAR04 0 0
Changes .   08MAR04 12MAR04 08MAR04 12MAR04 0 0
Production .   15MAR04 15MAR04 15MAR04 15MAR04 0 0
Marketing .   09FEB04 09FEB04 15MAR04 15MAR04 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 16, 2004. However, the other types of constraints are not mandatory; they are superseded 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 15th of December (by the 'feq' constraint), the early start schedule causes it to finish on the 19th 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.