You can use an Activity data set in lieu of, or in combination with, an ACTIVITY statement to define activities and constraints that relate to the activities. The Activity data set is similar to the Activity data set of the CPM procedure in SAS/OR software and is specified by using the ACTDATA= option in the PROC CLP statement.
The Activity data set enables you to define an activity, its domain, temporal constraints, resource constraints, and priority.
The temporal constraints can be either time-alignment-type or precedence-type constraints. The Activity data set requires
at least two variables: one to determine the activity, and another to determine its duration. The procedure terminates if
it cannot find the required variables. The activity is determined with the _ACTIVITY_
variable, which must be character, and the duration is determined with the _DURATION_
variable, which must be numeric. You can define temporal constraints, resource constraints, and priority by including additional
variables.
The _ALIGNDATE_
and _ALIGNTYPE_
variables enable you to define time-alignment-type constraints. The _ALIGNTYPE_
variable defines the type of the alignment constraint for the activity that is named in the _ACTIVITY_
variable with respect to the _ALIGNDATE_
variable. If the _ALIGNDATE_
variable is not present in the Activity data set, the _ALIGNTYPE_
variable is ignored. Similarly, _ALIGNDATE_
is ignored when _ALIGNTYPE_
is not present. The _ALIGNDATE_
variable can take nonnegative integer values. The _ALIGNTYPE_
variable can take the values shown in Table 3.4.
Table 3.4: Valid Values for the _ALIGNTYPE_
Variable
Value |
Type of Alignment |
---|---|
SEQ |
Start equal to |
SGE |
Start greater than or equal to |
SLE |
Start less than or equal to |
FEQ |
Finish equal to |
FGE |
Finish greater than or equal to |
FLE |
Finish less than or equal to |
The _SUCCESSOR_
variable enables you to define precedence-type relationships between activities by using AON (activity-on-node) format. The
_SUCCESSOR_
variable is a character variable. The _LAG_
variable defines the lag type of the relationship. By default, all precedence relationships are considered to be finish-to-start (FS). An FS type of precedence relationship is also referred to as a standard precedence constraint. All other types of precedence relationships are considered to be nonstandard precedence constraints.
The _LAGDUR_
variable specifies the lag duration. By default, the lag duration is zero.
For each (activity, successor) pair, you can define a lag type and a lag duration. Consider a pair of activities (A, B) with a lag duration represented by lagdur in Table 3.5. The interpretation of each of the different lag types is given in Table 3.5.
Table 3.5: Valid Values for the _LAG_
Variable
Lag Type |
Interpretation |
---|---|
FS |
Finish A + lagdur Start B |
SS |
Start A + lagdur Start B |
FF |
Finish A + lagdur Finish B |
SF |
Start A + lagdur Finish B |
FSE |
Finish A + lagdur = Start B |
SSE |
Start A + lagdur = Start B |
FFE |
Finish A + lagdur = Finish B |
SFE |
Start A + lagdur = Finish B |
The first four lag types (FS, SS, FF, and SF) are also referred to as finish-to-start, start-to-start, finish-to-finish, and start-to-finish, respectively. The next four types (FSE, SSE, FFE, and SFE) are stricter versions of FS, SS, FF, and SF, respectively. The first four types impose a lower bound on the start and finish times of B, while the last four types force the start and finish times to be set equal to the lower bound of the domain. The last four types enable you to force an activity to begin when its predecessor is finished. It is relatively easy to generate infeasible scenarios with the stricter versions, so you should use the stricter versions only if the weaker versions are not adequate for your problem.
The _RESOURCE_ and _QTY_ variables enable you to define resource constraints for activities. The _RESOURCE_ variable is a character variable that identifies the resource or resource pool. The _QTY_ variable is a numeric variable that identifies the number of units required. If the requirement is for a resource pool, you need to use the Resource data set to identify the pool members. See the section Resource Data Set for more information.
For example, the following observations specify that activity A1 needs one unit of resource R1 and two units of resource R2:
_ACTIVITY_ _RESOURCE_ _QTY_ A1 R1 1 A1 R2 2
The _PRIORITY_ variable enables you to specify an activity’s priority for use with the PRIORITY selection strategy of the ACTSELECT= option. The _PRIORITY_ variable can take any integer value. Lower numbers indicate higher priorities; a missing value is treated as . If the ACTSELECT=PRIORITY option is specified without the _PRIORITY_ variable, all activities are assumed to have equal priorities.
Table 3.6 lists all the variables that are associated with the ACTDATA= data set and their interpretations by the CLP procedure. For each variable, the table also lists its type (C for character, N for numeric), its possible values, and its default value.
Table 3.6: Activity Data Set Variables
Name |
Type |
Description |
Allowed Values |
Default |
---|---|---|---|---|
|
C |
Activity name |
||
|
N |
Duration |
Nonnegative integers |
0 |
|
C |
Successor name |
||
|
C |
Lag type |
FS, SS, FF, SF, FSE, SSE, FFE, SFE |
FS |
|
N |
Lag duration |
0 |
|
|
N |
Alignment date |
||
|
C |
Alignment type |
SGE, SLE, SEQ, FGE, FLE, FEQ |
|
|
C |
Resource name |
||
|
N |
Resource quantity |
Nonnegative integers |
1 |
|
N |
Activity priority |
Integers |
|