The CPM Procedure |
Often the activities in a project use several resources. If you assume that these resources are available in unlimited quantities, then the only restrictions on the start and finish times of the activities in the project are those imposed by precedence constraints and dates specified for alignment of the activities. In most practical situations, however, there are limitations on the availability of resources; as a result, neither the early start schedule nor the late start schedule (nor any intermediate schedule for that matter) may be feasible. In such cases, the project manager is faced with the task of scheduling the activities in the project subject to constraints on resource availability in addition to the precedence constraints and constraints on the start and finish times of certain activities in the project. This problem is known as resource allocation.
You can use PROC CPM to schedule the activities in a project subject to resource constraints. To perform resource allocation, you must specify the resource requirements for each activity in the project and also specify the amount of resources available on each day under consideration. The resource requirements are given in the Activity data set, with the variable names identified to PROC CPM through the RESOURCE statement. The levels of resources available on different dates, as well as other information regarding the resources, such as the type of resource, the priority of the resource, and so forth, are obtained from the RESOURCEIN= data set.
Specifying resource requirements is described in detail in the section "Specifying Resource Requirements", and the description of the format of the Resource data set is given in the section "RESOURCEIN= Input Data Set", which follows. the section "Scheduling Method" describes how you can use the SCHEDRULE= and DELAY= options (and other options) in conjunction with certain special observations in the Resource data set to control the process of resource allocation to suit your needs. Subsequent sections describe the different scheduling rules, supplementary resources, activity splitting, progress updating, and alternate resources.
The RESOURCEIN= data set (referred to as the Resource data set) contains all of the necessary information about the resources that are to be used by PROC CPM to schedule the project. Typically, the Resource data set contains the resource variables (numeric), a type identifier variable (character) that identifies the type of information in each observation, a period variable (numeric and usually a SAS time, date, or datetime variable), and a RESID variable that is used to specify alternate resources and auxiliary resources.
The value of the type identifier variable in each observation tells CPM how to interpret that observation. Valid values for this variable are RESLEVEL, RESTYPE, RESUSAGE, RESPRTY, SUPLEVEL, ALTPRTY, ALTRATE, RESRCDUR, CALENDAR, MULTALT, MINARATE, and AUXRES. If the value of the type identifier variable in a particular observation is 'RESLEVEL', then that observation contains the levels available for each resource from the time specified in the period variable. Missing values are not allowed for the period variable in an observation containing the levels of the resources. For consumable resources, the observation indicates the total availability and not the increase in the availability. Likewise, for replenishable resources, the observation indicates the new level and not the change in the level of the resource.
Each resource can be classified as either consumable or replenishable. A consumable resource is one that is used up by the job (such as bricks or money), while a replenishable resource becomes available again once a job using it is over (such as manpower or machinery). If the value of the type identifier variable is 'RESTYPE', then that observation identifies the nature (consumable or replenishable) of the resource. The observation contains a value 1 for a replenishable resource and a value 2 for a consumable one. A missing value in this observation is treated as 1. In fact, if there is no observation in the Resource data set with the type identifier variable equal to 'RESTYPE', then all resources are assumed to be replenishable.
Sometimes, it may be useful to include resources in the project that are to be used only for aggregation purposes. You can indicate that a given resource is to be used for aggregation, and not for resource allocation, by specifying the values 3 or 4, depending on whether the resource is replenishable or consumable. In other words, use 3 for replenishable aggregate resources and 4 for consumable aggregate resources.
Consumable resources are assumed to be used continuously throughout the duration of the activity at the rate specified in the Activity data set (as described in the section "Specifying Resource Requirements"). For example, when you specify a rate of 100 per day for bricks, the CPM procedure assumes that the activity consumes bricks at the constant rate of 100 per day. Sometimes, you may wish to allocate all of the resource at the beginning or end of an activity. For example, you may pay an advance at the start of a contracted activity while the full payment is made when the activity is completed. You can indicate such a profile of usage for a consumable resource using the keyword 'RESUSAGE' for the value of the type identifier variable. Valid values for the resource variables in such an observation are 0, 1, and 2. A value 0 indicates that the resource is used continuously at the specified rate throughout the activity's duration, a value 1 indicates that the resource is required at the beginning of the activity, and a value 2 specifies that the resource is used at the end of the activity. A missing value in this observation is treated as 0.
One of the scheduling rules that can be specified using the SCHEDRULE= option is RESPRTY, which requires ordering the resources according to some priority (details are given in the section "Scheduling Rules"). If this option is used, there must be an observation in the Resource data set with the type identifier variable taking the value 'RESPRTY'. This observation specifies the ordering of the resources.
If the type identifier variable is given as 'SUPLEVEL', the observation denotes the amount of extra resource that is available for use throughout the duration of the project. This extra resource is used only if the activity cannot be scheduled without delaying it beyond its late start time. See the section "Secondary Levels of Resources" for details about the use of supplementary levels of resources in conjunction with the DELAY= and ACTDELAY= options.
If the type identifier variable is specified as 'ALTRATE', 'ALTPRTY', or 'AUXRES', the Resource data set must also have a RESID variable that is used to identify the name of a resource for which the current observation lists the possible alternate resources or the required auxiliary resources. See the section "Specifying Alternate Resources" and the section "Auxiliary Resources" for details.
If the value of the type identifier variable is 'RESRCDUR', that observation specifies the effect of the resource on an activity's duration. Valid values for the resource variables in such an observation are 0, 1, and 2. A value 0 indicates that the resource uses a fixed duration (specified by the DURATION variable); in other words, the activity's duration is not affected by changing the rate of the resource. A value 1 indicates that the WORK variable for an activity specifies the total amount of work required by the resource that is used to calculate the time required by the resource to complete its work on that activity; such a resource is referred to as a driving resource. The value 2 indicates a third type of resource; such a resource (referred to as a spanning resource) is required throughout the activity's duration, no matter which resource is working on it. For example, an activity might require 10 percent of a "supervisor," or the use of a particular room, throughout its duration. For such an activity, the duration used for the spanning resource is computed after determining the span of the activity for all the other resources.
If the value of the type identifier variable is 'CALENDAR', that observation specifies the calendar that is followed by each resource. If no calendar is specified for a given resource, the relevant activity's calendar is used instead. This use of the calendar requires that the calendar variable in the Activity and other data sets be numeric.
If the value of the type identifier variable is 'MULTALT', that observation indicates which resources can have multiple alternate resources. The value 1 for a resource variable in the observation indicates that multiple alternates are allowed for that resource, and a value 0 indicates that multiple alternates are not allowed. See the section "Specifying Multiple Alternates" for details.
If the value of the type identifier variable is 'MINARATE', that observation indicates the minimum rate of substitution for each resource, whenever multiple alternates are used. The 'MINARATE' values specified in this observation are used only if the MULTIPLEALTERNATES option is specified or if the Resource data set has an observation with the type identifier value of 'MULTALT'.
The period variable must have nonmissing values for observations specifying the levels of the resources (that is, with type identifier equal to 'RESLEVEL'). However, the period variable does not have any meaning when the type identifier variable has any value other than 'RESLEVEL'; if the period variable has nonmissing values in these observations, it is ignored. The Resource data set must be sorted in order of increasing values of the period variable.
Multiple observations are allowed for each type of observation. If there is a conflict in the values specified, only the first nonmissing value is honored; for example, if there are two observations of the type 'RESTYPE' and a resource variable has value 1 in the first and 2 in the second of these observations, the resource type is assumed to be 1 (replenishable). On the other hand, if the value is missing in the first observation but set to 2 in the second, the resource type is assumed to be 2 (consumable).
A resource is available at the specified level from the time given in the first observation with a nonmissing value for the resource. Its level changes (to the new value) whenever a new observation is encountered with a nonmissing value, and the date of change is the date specified in this observation.
Table 2.24: Type Identifier VariablesType Identifier Keywords | Description | Values |
---|---|---|
Contains levels available for each | Missing values are not allowed. For con- | |
'RESLEVEL' | resource from the time specified in the | sumable resources, the observation ind- |
period variable. | icates the total availability and for replen- | |
ishable resources, the new level. | ||
Specifies the nature of the resources - i.e., | 1 = Replenishable | |
'RESTYPE' | if they are consumable, replenishable, | 2 = Consumable |
replenishable aggregate or consumable | 3 = Replenishable Aggregate | |
aggregate resources. | 4 = Consumable Aggregate | |
0 = Resource used continuously at specified rate | ||
'RESUSAGE' | Indicates a profile of usage for a consumable resource | 1 = Resource required at the beginning of activity |
2 = Resource used at the end of activity | ||
A missing value is treated as 0. | ||
Specifies that PROC CPM should sort the | ||
'RESPRTY' | activities in the waiting list in the order of | Low values indicate high priority. |
increasing values of the resource priority | ||
for the most important resource used by | ||
each activity. | ||
Specifies the amount of extra resource | ||
'SUPLEVEL' | available for use through out the duration | |
of the project. | ||
Specifies the effect of the resource on the | 0 = Resource uses a fixed duration | |
'RESRCDUR' | activity`s duration. | 1 = Driving resource |
2 = Spanning resource | ||
Specifies the calendar that is followed by | Requires the calendar variable in the | |
'CALENDAR' | each resource. If no calendar is specified | Activity and other data sets to be numeric. |
for a given resource, the relevant | ||
activity's calendar is used instead. | ||
Indicates which resources can have | 0 = Multiple alternates not allowed | |
'MULTALT' | multiple alternate resources. | 1 = Multiple alternates allowed |
Type Identifier Keywords | Description | Values |
Indicates the minimum rate of substitu- | ||
'MINARATE' | tion for each resource, whenever multiple | |
alternates are used. | ||
Specifies the rate of substitution of | Lower value indicates higher priority. | |
'ALTRATE' | alternate resources when a resource has | Missing values imply that the particular |
more than one substitute. Resource data | resource cannot be substituted. | |
set must have a RESID variable. | ||
Specifies the prioritization of the | Lower values indicate higher priority. | |
'ALTPRTY' | alternate resources when a resource has | |
more than one substitution. Resource | ||
data set must have a RESID variable. | ||
Specifies the auxiliary resources that | Value for each auxiliary resource indicates | |
'AUXRES' | are needed for each primary resource. | the rate at which it is required whenever the |
RESID variable specifies the name of the | primary resource is used. | |
primary resource. |
The following examples illustrate the details about the Resource data set. Consider the following Resource data:
OBS OBSTYPE DATE WORKERS BRICKS PAYMENT ADVANCE 1 RESTYPE . 1 2 2 2 2 RESUSAGE . . 0 2 1 3 RESPRTY . 10 10 10 10 4 SUPLEVEL . 1 . . . 5 RESLEVEL 1JUL04 . 1000 2000 500 6 RESLEVEL 5JUL04 4 . . . 7 RESLEVEL 9JUL04 . 1500 . .
There are four resources in these data, WORKERS, BRICKS, PAYMENT, and ADVANCE. The variable OBSTYPE is the type identifier, and the variable DATE is the period variable. The first observation (because OBSTYPE has value 'RESTYPE') indicates that WORKERS is a replenishable resource while the other three resources are consumable. The second observation indicates the usage profile for the consumable resources: the resource BRICKS is used continuously throughout the duration of an activity, while the resource PAYMENT is required at the end of the activity and the resource ADVANCE is needed at the start of the activity. The third observation indicates that all the resources have equal priority. In the fourth observation, a value '1' under WORKERS indicates that a supplementary level of 1 worker is available if necessary, while no reserve is available for the resources BRICKS, PAYMENT, and ADVANCE.
The next three observations indicate the resource availability profile. The resource WORKERS is unavailable until July 5, 2004, when the level jumps from 0 to 4 and remains at that level through the end of the project. The resource BRICKS is available from July 1, 2004, at level 1000, while the resource levels for PAYMENT, and ADVANCE are 2000 and 500, respectively. On July 9, an additional 500 bricks are made available to increase the total availability to 1500. Missing values in observations 5 and 6 indicate that there is no change in the availability for the respective resources.
As another example, suppose that you want to treat BRICKS as an aggregate resource (one that is not to be included in resource allocation). Then consider the following data from a Resource data set:
OBSTYPE BRICKS PAINTER SUPERV RESTYPE 4 1 1 RESRCDUR 0 1 2 CALENDAR 1 0 0
The first observation indicates that the resource BRICKS is consumable and is to be used only for aggregation while the other two resources are replenishable and are to be treated as constrained resources during resource allocation.
The second observation, with the keyword 'RESRCDUR', specifies the effect of the resource on an activity's duration. The value '0' for the resource BRICKS implies that this resource does not affect the duration of an activity. On the other hand, the value '1' identifies the resource PAINTER as a driving resource; this means that by increasing the number of painters, an activity's duration can be decreased. The procedure uses this information about the nature of the resource only if a particular observation in the Activity data set has valid values for both the WORK and DURATION variables. Otherwise, if you specify a value only for the WORK variable, the procedure assumes that the resource specifications in that observation drive the activity's duration. Likewise, if you specify a value only for the DURATION variable, the procedure assumes that the resources specified in that observation require a fixed duration.
In the Resource data set specifications, the second observation also identifies the resource SUPERV to be of the spanning type. In other words, such a resource is required by an activity whenever any of the other resources are working on the same activity. Thus, if you add more painters to an activity, thereby reducing its duration, the supervisor (a spanning resource) will be needed for a shorter time.
The third observation indicates the calendar to be used in calculating the activity's start and finish times for the particular resource. If you do not specify a calendar, the procedure uses the activity's calendar.
To perform resource allocation or to summarize the resource utilization, you must specify the amount of resources required by each activity. In this section, the format for this specification is described. The amount required by each activity for each of the resources listed in the RESOURCE statement is specified in the Activity data set. The requirements for each activity are assumed to be constant throughout the activity's duration. A missing value for a resource variable in the Activity data set indicates that the particular resource is not required for the activity in that observation.
The interpretation of the specification depends on whether or not the resource is replenishable. Suppose that the value for a given resource variable in a particular observation is 'x'. If the resource is replenishable, it indicates that x units of the resource are required throughout the duration of the activity specified in that observation. On the other hand, if the resource is consumable, it indicates that the specified resource is consumed at the rate of x units per unit interval, where interval is the value specified in the INTERVAL= option in the PROC CPM statement. For example, consider the following specification:
OBS ACTIVITY DUR WORKERS BRICKS 1 A 5 . 100 2 B 4 2 .
Here, ACTIVITY denotes the activity under consideration, DUR is the duration in days (assuming that INTERVAL=DAY), and the resource variables are WORKERS and BRICKS. A missing value for WORKERS in observation 1 indicates that activity 'A' does not need the resource WORKERS, while the same is true for the resource BRICKS and activity 'B'. You can assume that the resource WORKERS has been identified as replenishable, and the resource BRICKS has been identified as consumable in a Resource data set. Thus, a value '100' for the consumable resource BRICKS indicates that 100 bricks per day are required for each of the 5 days of the duration of activity 'A', and a value '2' for the replenishable resource WORKERS indicates that 2 workers are required throughout the duration (4 days) of activity 'B'. Recall that consumable resources can be further identified as having a special usage profile, indicating that the requirement is only at the beginning or end of an activity. See the section "Variable Usage Profile for Consumable Resources" for details.
The CPM procedure enables you to specify negative resource requirements. A negative requirement indicates that a resource is produced instead of consumed. Typically, this interpretation is valid only for consumable resources. For example, a brick-making machine may produce bricks at the rate of 1000 units per hour which are then available for consumption by other tasks in the project. To indicate that a resource is produced (and not consumed) by an activity, specify the rate of usage for the resource as a negative number. For example, to indicate that a machine produces boxed cards at the rate of 5000 boxes per day, set the value of the resource, NUMBOXES, to -5000.
PROC CPM uses the serial-parallel (serial in time and parallel in activities) method of scheduling. In this section, the basic scheduling algorithm is described. (Modifications to the algorithm if an ACTUAL statement is used, if activity splitting is allowed, or if alternate resources are specified, are described later.) The basic algorithm proceeds through the following steps:
Once an activity that uses a supplementary level of a replenishable resource is over, the supplementary level that was used is returned to the reservoir and is not used again until needed. For consumable resources, if supplementary levels were used on a particular date, PROC CPM attempts to bring the reservoir back to the original level at the earliest possible time. In other words, the next time the primary availability of the resource increases, the reservoir is first used to replenish the supplementary level of the resource. (See Example 2.16, "Using Supplementary Resources"). Adjustment is made to the resource availability profile to account for any activity that is scheduled to start at time.
Steps 1, 2, and 3 are repeated until all activities are scheduled or the procedure stops with an error message.
Some important points to keep in mind are:
The SCHEDRULE= option specifies the criterion to use for determining the order in which activities are to be considered while scheduling them subject to resource constraints. As described in the section "Scheduling Method", at a given time specified by time, all activities whose tentative e_start coincides with time are arranged in a list ordered according to the scheduling rule, schedrule. The SCHEDRULE2= option can be used to break ties caused by the SCHEDRULE= option; valid values for schedrule2 are the same as for schedrule. However, if schedrule is ACTPRTY, then schedrule2 cannot be RESPRTY, and vice versa.
The following is a list of the six valid values of schedrule, along with a brief description of their respective effects.
Note: If SCHEDRULE is specified as ACTPRTY, the RESOURCE statement must contain the specification of the variable in the Activity data set that assigns priorities to the activities; if the variable name is not specified through the ACTIVITYPRTY= option, then CPM ignores the specification for the SCHEDRULE= option and uses the default scheduling rule, LST, instead.
There are two factors that you can use to control the process of scheduling subject to resource constraints: time and resources. In some applications, time is the most important factor, and you may be willing to use extra resources in order to meet project deadlines; in other applications, you may be willing to delay the project completion by an arbitrary amount of time if insufficient resources warrant doing so. The DELAY= and ACTDELAY= options and the availability of supplementary resources enable you to select either method or a combination of the two approaches.
In the first case, where you do not want the project to be delayed, specify the availability of supplementary resources in the Resource data set and set DELAY=0. In the latter case, where extra resources are unavailable and you are willing to delay project completion time, set the DELAY= option to some very large number or leave it unspecified (in which case it is assumed to be INFINITY). You can achieve a combination of both effects (using supplementary levels and setting a limit on the delay allowed) by specifying an intermediate value for the DELAY= option and including an observation in the Resource data set with supplementary levels.
You can also use the INFEASDIAGNOSTIC option which is equivalent to specifying infinite supplementary levels for all the resources under consideration. In this case, the DELAY= value is assumed to equal the default value of +INFINITY, unless it is specified otherwise. See Example 2.17, "INFEASDIAGNOSTIC Option and Aggregate Resource Type," for an illustration.
The DELAY= option presupposes that all the activities can be subjected to the same amount of delay. In some situations, you may want to control the amount of delay for each activity on the basis of some criterion, say the amount of float present in the activity. The ACTDELAY= option enables you to specify a variable amount of delay for each activity.
If resource-driven durations or resource calendars are specified, the procedure computes the start and finish times for each resource separately for each activity. An activity is considered to be completed only when all the resources have completed their work on that activity. Thus, an activity's start (finish) time is computed as the minimum (maximum) of the start (finish) times for all the resources used by that activity.
During resource-constrained scheduling, an activity enters the list of activities waiting for resources when all its precedence constraints have been satisfied. As before, this list is ordered using the scheduling rule specified. At this point, a tentative start and finish time is computed for each of the resources required by the activity using the resource's duration and calendar. An attempt is made to schedule all of this activity's resources at these calculated times using the available resources. If the attempt is successful, the activity is scheduled to start at the given time with the appropriate resource schedule times, and the required resources are reduced from the resource availabilities. Otherwise, the procedure attempts to schedule the next activity in the list of activities waiting for resources. When all activities have been considered at the given time, the procedure continues to the next event and continues the allocation process. Note that, at a given point of time, the procedure schedules the activity only if all the required resources are available for that activity to start at that time (or at the nearest time per that resource's calendar), unless you specify the INDEPENDENTALLOC option.
The INDEPENDENTALLOC option enables each resource to be scheduled independently for the activity. Thus, when an activity enters the list of activities waiting for resources, each resource requirement is considered independently, and a particular resource can be scheduled for that activity even if none of the other resources are available. However, the spanning type of resources must always be available throughout the activity's duration. The activity is considered to be finished (and its successors can start) only after all the resources for that activity have been scheduled. This option is valid even if all activities have fixed durations and calendars are not associated with resources.
As mentioned in the section "Scheduling Method", PROC CPM assumes that activities cannot be preempted once they have started. Thus, an activity is scheduled only if it can be assured of enough resources throughout its entire duration. Sometimes, you may be able to make better use of the resources by allowing activities to be split. PROC CPM enables you to specify the maximum number of segments that an activity can be split into as well as the minimum duration of any segment of the activity. Suppose that for a given activity, d is its duration, maxn is the maximum number of segments allowed, and dmin is the minimum duration allowed for a segment. If one or the other of these values is not given, it is calculated appropriately based on the duration of the activity.
The scheduling algorithm described earlier is modified as follows:
Note that splitting may not always reduce project completion time; it is designed to make better use of resources. In particular, if there are gaps in resource availability, it allows activities to be split and scheduled around the gaps, thus using the resources more efficiently.
If activity splitting is allowed, a new variable is included in the Schedule data set called SEGMT_NO (segment number). If splitting does occur, the Schedule data set has more observations than the Activity data set. Activities that are not split are treated as before, except that the value of the variable SEGMT_NO is set to missing. For split activities, the number of observations output is one more than the number of disjoint segments created.
The first observation corresponding to such an activity has SEGMT_NO set to missing, and the S_START and S_FINISH times are set to be equal to the start and finish times, respectively, of the entire activity. That is, S_START is equal to the scheduled start time of the first segment, and S_FINISH is equal to the scheduled finish time of the last segment that the activity is split into. Following this observation, there are as many observations as the number of disjoint segments in the activity. All values for these additional observations are the same as the corresponding values for the first observation for this activity, except for the variables SEGMT_NO, S_START, S_FINISH, and the DURATION variable. SEGMT_NO is the index of the segment, S_START and S_FINISH are the resource-constrained start and finish times for this segment, and DURATION is the duration of this segment.
The resource-constrained scheduling algorithm uses the early start schedule as the base schedule to determine possible start times for activities in the project. If an ACTUAL statement is used in the invocation of PROC CPM, the early start schedule (as well as the late start schedule) reflects the progress information that is specified for activities in the project, and thus affects the resource constrained schedule also. Further, activities that are already completed or in progress are scheduled at their actual start without regard to resource constraints. If the resource usage profile for such activities indicates that the resources are insufficient, a warning is printed to the log, but the activities are not postponed beyond their actual start time. The Usage data set contains negative values for the availability of the insufficient resources. These extra amounts are assumed to have come from the supplementary levels of the resources (if such a reservoir existed); for details on supplementary resources, see the section "Secondary Levels of Resources".
If activity splitting is allowed (through the specification of the MINSEGMTDUR or MAXNSEGMT variable or the SPLITFLAG or TIMENOWSPLT option), activities that are currently in progress may be split at TIMENOW if resources are insufficient; then the second segment of the split activity is added to the list of activities that need to be scheduled subject to resource constraints. Starting from TIMENOW, all activities that are still unscheduled are treated as described in the section "Scheduling Method".
PROC CPM enables you to identify alternate resources that can be substituted for any given resource that is insufficient. Thus, for example, you can specify that if programmer John is unavailable for a given task, he can be substituted by programmer David or Robert. This information is passed to PROC CPM through the Resource data set.
As with other aspects of the Resource data set, each observation is identified by a keyword indicating the type of information in that observation. Two keywords, ALTRATE and ALTPRTY, enable you to specify the rate of substitution and a prioritization of the alternate resources when a resource has more than one substitution (lower value indicates higher priority). Further, a new variable (identified to PROC CPM through the RESID= option) is used to identify the resource for which alternates are being specified in the current observation. Consider the following Resource data:
OBS OBSTYPE RES_NAME RES_DATE JOHN DAVID ROBERT 1 RESTYPE . 1 1.0 1.0 2 ALTRATE JOHN . 1 0.5 0.5 3 ALTPRTY JOHN . 1 2.0 3.0 4 RESLEVEL 15JUL04 1 1.0 1.0
In these Resource data, the second observation indicates that John can be substituted by David or Robert; however, either David or Robert can accomplish John's tasks with half the effort. In other words, if an activity requires 1 unit of John, it can also be accomplished with 0.5 units of David. Also, the third observation, with OBSTYPE='ALTPRTY', indicates that if John is unavailable, PROC CPM should first try to use David and if he, too, is unavailable, then should use Robert. This set up enables a wide range of control for specifying alternate resources.
In other words, the mechanism for specifying alternate resources is as follows: for each resource, specify a list of possible alternatives along with a conversion rate and an order in which the alternatives are to be considered. In the Resource data set, add another variable (identified by the RESID= option) to specify the name of the resource variable for which alternatives are being specified (the variable RES_NAME in the preceding example).
Let OBSTYPE='ALTRATE' for the observation that specifies the rate of conversion for each possible alternate resource (missing implies the particular resource cannot be substituted). For resources that drive an activity's duration, the specification of the alternate rate is used as a multiplier of the resource-driven duration. See the section "Resource-Driven Durations and Alternate Resources" for details.
Let OBSTYPE='ALTPRTY' for the observation that specifies a prioritization for the resources.
All substitute resources must be of the same type (replenishable or consumable) as the primary resource. The specification of the RESID= option triggers the use of alternate resources. If alternate resources are used, the Schedule data set contains new variables that specify the actual resources that are used; the names of these variables are obtained by prefixing the resource names by 'U'. When activities are allowed to be split and alternate resources are allowed, different segments of the activity can use a different set of resources. If this is the case, the Schedule data set contains a different observation for every segment that uses a different set of resources, even if these segments are contiguous in time. Contiguous segments, even if they use different sets of resources, are not treated as true splits for the purpose of counting the number of splits allowed for the activity.
By default, multiple resources cannot be used to substitute for a single resource. To enable multiple alternates, use the MULTIPLEALTERNATES option or add an observation to the Resource data set identifying which resources allow multiple alternates. For details, see the section "Specifying Multiple Alternates".
See Example 2.20 for an illustration of the use of alternate resources.
As described in the section "Specifying Alternate Resources", you can use the Resource data set to specify alternate resources for any given resource. You can specify a rate of substitution and a priority for substitution. However, the CPM procedure will not use multiple alternate resources to substitute for a given resource. For example, suppose that an activity needs two programmers and the available programmers (alternate resources) are John and Mary. By default, the CPM procedure cannot assign both John and Mary to the activity to fulfill the resource requirement of two programmers.
However, this type of substitution is useful to effectively model group resources or skill pools. To enable substitution of multiple alternates for a single resource, use the MULTIPLEALTERNATES option in the RESOURCE statement. This option enables all resources that have alternate specifications (through observations of the type ALTRATE or ALTPRTY in the Resource data set) to use multiple alternates. See Table 2.24 for details about type identifier variables.
You can refine this feature to selectively allow multiple substitution or set a minimum rate of substitution, by adding special observations to the Resource data set. As with other aspects of the Resource data set, the specifications related to multiple alternates are identified by observations with special keywords, MULTALT and MINARATE.
Let OBSTYPE='MULTALT' for the observation that identifies which resources can have multiple alternates. Valid values for such an observation are '0' and '1': '0' indicates that the resource cannot be substituted by multiple resources, and '1' indicates that it can be substituted by multiple resources. If the Resource data set contains such an observation, the MULTIPLEALTERNATES option is ignored and the values specified in the observation are used to allow multiple substitutions for only selected resources. See Table 2.24 for details about type identifier variables.
Let OBSTYPE='MINARATE' for the observation that indicates the minimum rate of substitution for each resource. For example, you may not want a primary resource requirement of 1.5 programmers, to be satisfied by 5 different alternate programmers at a rate of 0.3 each. To ensure that the minimum rate of substitution is 0.5, specify the value for the resource variable, PROGRAMMER, as '0.5' in the observation with OBSTYPE='MINARATE'. In other words, use this observation if you do not wish to split an activity's resource requirement across several alternate resources with a very small rate of utilization per resource. See Table 2.24 for details about type identifier variables. Consider the following Resource data:
OBS OBSTYPE RES_NAME RES_DATE JOHN DAVID ROBERT 1 RESTYPE . 1 1 1 2 ALTRATE JOHN . 1 2 2 3 MULTALT . . 1 . . 4 MINARATE . . 0.5 . . 5 RESLEVEL 15JUL04 0 1.0 1.0
In these Resource data, observations 3 and 4 control the use of multiple alternates. They specify that a requirement for John can be substituted with multiple alternates. Further, if multiple alternates are used instead of John, do not allocate them in units less than 0.5. Observation 2 indicates that David and Robert require twice the effort to accomplish John's tasks. Thus, if an activity requires 1 unit of John, and he is unavailable, the CPM procedure will require 2 units of David (or Robert) to substitute for John. However, only 1 unit each of David and Robert is available. If multiple alternates are not allowed, the resource allocation algorithm will fail. However, since the resource John does allow multiple substitution, the activity can be scheduled with 1 unit of David and 1 unit of Robert (each substituting for 1/2 of the requirement for John).
Allowing multiple alternates for a single resource raises an interesting question: When distributing the resource requirements across multiple alternatives, should the primary resource be included in the list of multiple alternates? For instance, in the preceding example, if the resource level for John is '0.5' (in observation 5), should the activity use John at rate 0.5 and assign the remainder to one (or more) of the alternate resources? Or, should the primary resource be excluded from the list of possible alternates? You can select either behavior for the primary resource by specifying '1' (for inclusion) or '0' (for exclusion) in the observation with OBSTYPE='ALTRATE' that corresponds to the primary resource (with RES_NAME='JOHN'). Thus, in the preceding example, John can be one of the multiple alternates when substituting for himself. To exclude John from the list, set the value of the variable JOHN to '0' in observation 2. You will also need to set the value of JOHN to '0' in any observation with OBSTYPE='ALTPRTY' and RES_NAME='JOHN'.
the section "Specifying Alternate Resources" describes the use of the RESID= option and the observations of type 'ALTRATE' and 'ALTPRTY' in the Resource data set to control the use of alternate resources during resource allocation. The behavior described in that section refers to the substitution of resources for resources that have a fixed duration. Alternate resources can also be specified for resources that drive an activity's duration. However, the specification of the alternate rate is interpreted differently: it is used as a multiplier of the resource-driven duration.
For example, consider the following Resource data:
OBS OBSTYPE RES_NAME RES_DATE JOHN DAVID ROBERT 1 RESTYPE . . 1 1 1 2 RESRCDUR . . 1 1 1 3 ALTRATE JOHN . 1 2 2 4 ALTPRTY JOHN . 1 2 3 5 RESLEVEL . 15JUL04 . 1.0 1.0
In these Resource data, the second observation indicates that all the resources are driving resources. The third observation indicates that John can be substituted by David or Robert; however, either David or Robert will require twice as long to accomplish John's tasks for resource-driven activities. Thus, in contrast to the fixed-duration activities, the ALTRATE specification changes the duration of the alternate resource, not the rate of use.
For instance, consider the following activity with the specified values for the DURATION and WORK variables and the resource requirement for John:
OBS ACTIVITY DURATION WORK JOHN DAVID ROBERT 1 Act1 3 10 1 . .
Activity 'Act1' requires 10 days of work from John, indicating that the resource-driven duration for Act1 is 10 days. However, from the preceding Resource data, John is not available, but can be substituted by David or Robert, who will require twice as long to accomplish the work. So, if Act1 is scheduled using either one of the alternate resources, its resource-driven duration will be 20 days.
Sometimes, the use of a certain resource may require simultaneous use of other resources. For example, use of a crane will necessitate the use of a crane operator. In other words, if an activity needs the resource, CRANE, it will also need a corresponding resource, CRANEOP. Such requirements can be easily modeled by adding both CRANE and CRANEOP to the list of resources required by the activity.
However, when alternate resources are used, the problem becomes more complex. For example, suppose an activity requires a CRANE and there are two possible cranes that can be used, CRANE1 and CRANE2. You can specify CRANE1 and CRANE2 as the alternate resources for CRANE. Suppose further that each of the two cranes has a specific operator, CRANEOP1 and CRANEOP2, respectively. Specifying CRANEOP1 and CRANEOP2 separately as alternates for CRANEOP will not necessarily guarantee that CRANEOP1 (or CRANEOP2) is used as the alternate for CRANEOP in conjunction with the use of the corresponding CRANE1 (or CRANE2).
You can model such a situation by the use of Auxiliary resource specification: specify CRANEOP1 and CRANEOP2 as auxiliary resources for CRANE1 and CRANE2, respectively. Auxiliary resources are specified through the Resource data set, using observations identified by the keyword AUXRES for the value of the OBSTYPE variable. For an observation of this type, the RESID variable specifies the name of the primary resource. (This is similar to the specification of ALTRATE and ALTPRTY.) See Table 2.24 for details about type identifier variables.
Once auxiliary resources are specified in the Resource data set, it is sufficient to specify only the primary resource requirements in the Activity data set. In this situation, for example, it is sufficient to require a CRANE for the activity in the Activity data set.
In the Resource data set, add a new observation type, 'AUXRES', which will specify the auxiliary resources that are needed for each primary resource. For an observation of this type, the RESID variable specifies the name of the primary resource. The value for each auxiliary resource indicates the rate at which it is required whenever the primary resource is used. You will also need to specify CRANE1 and CRANE2 as the alternate resources for CRANE in the Resource data set.
When scheduling the activity, PROC CPM will schedule CRANE1 (or CRANE2) as the alternate only if both CRANE1 and CRANEOP1 (or CRANE2 and CRANEOP2) are available.
For instance, the preceding example will have the following Resource data set:
OBSTYPE RESID PER CRANE CRANE1 CRANE2 CRANEOP1 CRANEOP2 AUXRES CRANE1 . . . . 1 . AUXRES CRANE2 . . . . . 1 ALTRATE CRANE . . 1 1 . . RESLEVEL . 10JUL04 . 1 1 1 1
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.