solving resource-constrained project scheduling problems by a* search

24
Solving Resource-Constrained Project Scheduling Problems by A* Search Colin E. Bell and Kwangho Park Department of Management Sciences, University of Iowa, Iowa City, Iowa 52242 A new exact method is presented for finding a minimum makespan schedule for a multiresource constrained project scheduling problem. This method employs the philosophical approach used earlier to develop a successful heuristic algorithm for the same class of problems. The approach repairs resource conflicts rather than constructing detailed schedules by dispatching activities. Resource-violating sets of activities are identified whose concurrent execution would violate resource constraints. Repairs are made by imposing a precedence constraint to sequence two activities in such a resource-violating set. Computational results are discussed for a standard set of test problems. An A* algorithm is employed. The most successful version of our algorithm involves some perhaps surprising design choices which might be relevant to the design of A*-like search algorithms in other contexts. 1. INTRODUCTION Han [3] and Bell and Han [l] have reported on a new heuristic algorithm for project scheduling subject to precedence constraints and constraints on the availability of each of several shared resources. The algorithm was applied to a standard set of test problems. Its performance was noteworthy when compared to existing heuristics. The purpose of this research is to attempt to build on this success by developing an algorithm to solve the same problems exactly. Our success has been mixed; here we report on less-successful as well as on more-successful attempts in hope that the discussion may provide insight useful in future algorithm design decisions in heuristic search environments. By “heu- ristic search” we mean that a heuristic estimator provides guidance in establish- ing an order for “expanding” partial solutions. The search does not stop short of optimality. A review of relevant scheduling research is provided in [l] and will not be repeated here. The class of problem treated here is identical to that in [9]. A review of three existing exact solution approaches for this class of problem is contained in [6]. Test problems were obtained from Patterson and had been used previously in [6] and [2a]. Precise assumptions are listed in the next section. The A* algorithm is described in most introductory artificial inteHigence texts, e.g., [2,7]. The algorithm was first described in [4,5]. It is a “best-first search” algorithm. If the search is properly organized, then the first feasible solution found is guaranteed to be optimal. We exploit this organizational property here. As in approaches to search traditionally used in other operations research contexts (e.g., branch and bound) it is important to have effective pruning rules. In Section 4 the details of our algorithm are provided. Although extensive Naval Research Logistics, Vol. 37, pp. 61-84 (1990) Copyright 0 1990 by John Wiley & Sons, Inc. CCC 0028-1441/90/010061-24$04.00

Upload: colin-e-bell

Post on 06-Jun-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Solving resource-constrained project scheduling problems by a* search

Solving Resource-Constrained Project Scheduling Problems by A* Search

Colin E. Bell and Kwangho Park Department of Management Sciences, University of Iowa, Iowa City, Iowa 52242

A new exact method is presented for finding a minimum makespan schedule for a multiresource constrained project scheduling problem. This method employs the philosophical approach used earlier to develop a successful heuristic algorithm for the same class of problems. The approach repairs resource conflicts rather than constructing detailed schedules by dispatching activities. Resource-violating sets of activities are identified whose concurrent execution would violate resource constraints. Repairs are made by imposing a precedence constraint to sequence two activities in such a resource-violating set. Computational results are discussed for a standard set of test problems. An A* algorithm is employed. The most successful version of our algorithm involves some perhaps surprising design choices which might be relevant t o the design of A*-like search algorithms in other contexts.

1. INTRODUCTION

Han [3] and Bell and Han [l] have reported on a new heuristic algorithm for project scheduling subject t o precedence constraints and constraints on the availability of each of several shared resources. The algorithm was applied to a standard set of test problems. Its performance was noteworthy when compared to existing heuristics. The purpose of this research is to attempt to build on this success by developing an algorithm to solve the same problems exactly.

Our success has been mixed; here we report on less-successful as well as on more-successful attempts in hope that the discussion may provide insight useful in future algorithm design decisions in heuristic search environments. By “heu- ristic search” we mean that a heuristic estimator provides guidance in establish- ing an order for “expanding” partial solutions. The search does not stop short of optimality.

A review of relevant scheduling research is provided in [l] and will not be repeated here. The class of problem treated here is identical to that in [9]. A review of three existing exact solution approaches for this class of problem is contained in [6]. Test problems were obtained from Patterson and had been used previously in [6] and [2a]. Precise assumptions are listed in the next section.

The A* algorithm is described in most introductory artificial inteHigence texts, e.g., [2,7]. The algorithm was first described in [4,5]. It is a “best-first search” algorithm. If the search is properly organized, then the first feasible solution found is guaranteed to be optimal. We exploit this organizational property here. As in approaches to search traditionally used in other operations research contexts (e.g., branch and bound) it is important to have effective pruning rules. In Section 4 the details of our algorithm are provided. Although extensive

Naval Research Logistics, Vol. 37, pp. 61-84 (1990) Copyright 0 1990 by John Wiley & Sons, Inc. CCC 0028-1441/90/010061-24$04.00

Page 2: Solving resource-constrained project scheduling problems by a* search

62 Naval Research Logistics, Vol. 37 (1990)

computational testing has been performed only for the version of our algorithm which proved most efficient on a small set of sample problems, we gained enough insight about performance to be able to compare the effects of various design decisions. The final algorithm differed significantly from the initial version. In Section 4 we discuss these design decisions in more detail.

Computational results are provided in Section 5 . Direct comparison of compu- tational times with those of other approaches for the same problems is difficult. We have had the benefit of general improvements in compuational technology since the date of prior studies. However, prior studies used mainframe com- puters and languages such as Fortran; computations reported in this paper were performed on an Apple Macintosh Plus using a version of Common Lisp. We had limited access to other computers and ran one additional problem on a Macintosh I1 and a Sun workstation as well as the Macintosh Plus. This problem required 122 minutes on a Macintosh Plus, 30 minutes on a Macintosh 11, and 10.7 minutes on a Sun. Stinson's algorithm solved this problem (shown as Figure 5 in [9]) in 6.05 minutes on an IBM 370/155.

Comparison of computational results might best be downplayed anyway be- cause of a fundamental difference in the behavior of our approach from that of previous approaches. Consider a sequence of problem instances { P , , P 2 , . . . } whose members are progressively more resource-constrained. For example, each problem instance in the sequence may have the same set of activities and precedence constraints but for j > i, P, may have lower availability of some resource(s) and/or higher usage of some resource(s) by some activities when compared to P,. Successive problem instances in this sequence are tougher for our algorithm to solve. The search trees required by our algorithm increase in depth as resource-constrainedness increases. On the other hand, with existing algorithms which use some dispatching procedure to schedule subsets of activi- ties, the unpruned search trees would be smaller as progressively more resource- constrained problem instances were encountered. This is because tighter re- source constraints will imply that any given node in the search tree may have fewer children.

Although it may appear from the above discussion that our method might be better for lightly resource-constrained problems and other methods better for heavily resource-constrained problems, this is not clear. Since all methods depend heavily on effective pruning rules, it is difficult to compare the practical merits of various algorithms including ours. The comparative study in [6] showed that each of three existing algorithms performs best over some subset of the test problems. Hopefully, there would also be a subset of these fest problems for which our algorithm would be more efficient than the three existing algorithms.

2. ASSUMPTIONS

Figure 1 illustrates a typical problem. The activity-on-nodes (hereafter AON) network shows required precedence relationships between activities. The net- work is assumed to contain unique dummy start and dummy finish activities of duration 0. Activities 1 and 14 are dummy activities for project start and finish respectively. Tabled information below the network shows (1) duration and (2)

Page 3: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 63

resource availability: (2 12) Act. Start Act No. Res. Req Duration Time No. Res. Req Duration

0 0 8 (0 0 0) 1 6 0 9 (0 1 1) 4 4 0 10 (0 0 1) 3 3 0 11 (0 0 1) 2 1 4 12 (0 10 ) 3 6 4 13 (0 0 0) 5 2 4 14 (0 0 0) 0

1 (0 0 0) 2 (1 0 0) 3 (0 0 0) 4 (0 0 0) 5 (0 0 0) 6 (1 0 1) 7 (1 0 0)

Figure 1. A simple network example with initial schedule.

Start Time

6 6 6 6

10 13 18

number of units of each of three resources required by each activity. The overall availability Ri of each resource i is also shown. Resource availabilities are 2, 1, and 2, respectively. The number of different resource types can be greater than 3. In any instance of our problem, all numerical information is assumed to be integer-valued.

If activity A requires rA1 units of resource i, then (1) this requirement is constant throughout the duration of A and (2) the resource is “shared” so that rA1 units of resource i are removed from a single pool of available units of resource i when activity A starts and are returned to this pool when activity A finishes. The pool for any resource i must be managed so that the number of units left in it is never allowed to fall below 0. Thus, in addition to the pre- cedence constraints illustrated in the network diagram, these resource con- straints prevent the concurrent execution of any set of activities which together would require more than Ri units of any resource i.

Activities may not be interrupted (preempted) during execution. The objec- tive is to find a schedule which minimizes makespan among all schedules which respect all precedence and resource constraints.

3. PHILOSOPHICAL APPROACH TO SEARCH

Prior approaches to solving this problem have involved searching through a tree of partial schedules. A state (node) in this tree represents a partial schedule in which start times have been assigned to some subset of tasks consistent with

Page 4: Solving resource-constrained project scheduling problems by a* search

64 Naval Research Logistics, Vol. 37 (1990)

precedence and resource constraints. Such partial schedules are built up starting at time 0 and proceeding systematically as outlined below.

Any partial schedule has an associated earliest possible time at which new scheduling decisions may be made. All subsets of activities (including the empty set) which could be started at this time without violating precedence or resource constraints are identified. Children of the partial schedule can then be generated by adding in turn each of these subsets to the partial schedule and determining the appropriate new scheduling time for each child state. Leaf nodes of the search tree are complete feasible schedules. Thus this approach is one of genera- ting child nodes in the search tree by “dispatching” activities.

Of course, the effectiveness of such search procedures depends on the power of pruning rules for recognizing partial schedules which need not be considered further (i.e., which can be “fathomed”). One effective pruning rule developed in [8] is if any already-scheduled activity can be started earlier without violating precedence or resource constraints and without adjusting the scheduled start times of other activities, then the current partial solution can be fathomed. We say that such an identified activity is “left-shiftable” (because it would be shifted to the left if the schedule were displayed in a Gantt chart). This rule has been used in past research; we will also use it.

Like prior approaches, our approach also searches through a space of partial schedules but “partial” has a different meaning. Any partial schedule in our search space satisfies all precedence constraints and assigns a start time to all activities. But it is “partial” because it may violate one or more resource constraints. The only constraints expressed in any state of our state space are precedence constraints. A set of precedence constraints (expressed in standard AON network form) has an associated minimum makespan. Because of slack in scheduling noncritical activities, there can be many schedules corresponding to a given precedence network which achieve this minimum makespan. Since there is no loss in scheduling each activity at its earliest possible time, we will associate with any state only the single schedule which assigns the unique early start time to each activity. Thus a state is a set of precedence constraints expressed in AON network form, a state’s makespan is the associated minimum makespan, and a state’s schedule is the associated early start time schedule.

For a particular state, a resource violating set (RVS) of activities is identified such that: (1) all activities in RVS are executed concurrently under the state’s schedule and (2) the usage of some resource i by these activities exceeds the availability R,. Child states are then generated by adding in turn each additional precedence constraint which would guarantee that all activities in RVS could no longer be executed simultaneously. For example, if all members of the RVS of activities {a5 a6 a7) are in progress in the time interval ( l , t + 1) under the schedule of the current state, then six child states can be generated by adding in turn one of the arcs {a5+a6, ~ 5 4 ~ 7 , a6+a7, a6-a5, a7+a5, a7+a6}. Each of these arcs expresses a constraint that one specific activity in (a5 a6 a7) must finish before a different specific activity in (a5 a6 a7) can start. Adding any of these arcs to the precedence network blocks the concurrent execution of (a5 a6 a7). A leaf node of our search tree is a state with enough precedence constraints that the associated schedule does not violate any resource con- straints.

Page 5: Solving resource-constrained project scheduling problems by a* search

65 Bell and Park: A* Algorithm

To summarize, our approach searches through a space of partial schedules each of which assigns a start time to each activity and does not violate any precedence constraints but is “partial” because the schedule may violate re- source constraint(s) in one or more time intervals ( t , t + 1). If resource violations are detected in numerous time intervals ( t , t 4 l), it is not immediately clear which violations should be repaired. We have found that concentrating on the earliest time interval ( t , t + 1) at which a resource violation occurs has yielded faster algorithms for our test problems. Thus, as in existing approaches, we plan from time 0 forward. As in existing approaches, the success of our approach hinges on the application of valid and powerful pruning rules to recognize states which can be fathomed.

Before becoming mired in detail, we should point out a perhaps surprising feature of our algorithm. When a state S with precedence network P is found to contain a resource violating set V of activities in some time interval ( t , t + l), a disjunctive constraint is identified to repair this violation. This constraint requires the addition of exactly one new arc to P (e.g., either a5 +a6 or a5 +a7 o r . . .). Thus, one child state is generated for each disjunct giving new states S , , S2, . . . with augmented precedence networks P I , P2, . . . . One might suspect that the search process would proceed best when states SI, S2, . . . are generated by adding the strongest possible additional precedence constraints to state S. With the above procedure, for example, the violating set V can never reappear in any time interval in any state which is a descendant of S.

We have found that adding the strongest possible constraints leads to an algorithm with slower performance in our test problems. Our final algorithm involves adding weaker constraints. In fact, under the final version of our algorithm, if children of S are generated to correct resource violating set V in time ( t , t + l), the same violating set V may reappear in some state which is a descendant of S. In this case, V will appear in some interval ( t* , t* + 1) with t* > t. The strategy of adding weaker constraints appears better in practice because of a lower branching factor and an improved ability to apply pruning rules.

4. AN A* ALGORITHM

Our resource-constrained project scheduling problem can be formulated as a tree search problem. Each state in the search tree is a set of precedence constraints expressed in network form. From such a state one can compute the schedule which schedules each activity at its earliest start time with respect to these precedence constraints. The initial state network contains only those precedence constraints expressed in the original problem description. Using the problem in Figure 1 as an example, the network in Figure 1 would be the initial state. The corresponding early time schedule is shown in tabled information below the network. A goal state is a network which satisfies resource constraints as well as precedence constraints and among such networks has minimal make- span. Imposing new disjunctive constraints allows one to generate the children of a state (one child for each disjunct). A parent state is transformed into a child state by the addition of exactly one arc to the network. Thus, the search process is a sequential process of identifying new disjunctive constraints and deciding on the order of investigation of generated child states.

Page 6: Solving resource-constrained project scheduling problems by a* search

66 Naval Research Logistics, Vol. 37 (1990)

States which have not been investigated are assigned a heuristic value by a state evaluation function; states are then put into a priority queue with priority ranked by heuristic value; highest priority goes to smallest heuristic value; states are then removed from the front of this queue for investigation. An effective state evaluation function would guide the search so that only a small number of states are investigated before an optimal solution is found. A monotone state evaluation function (in a minimization problem such as ours) has the property that the value assigned to any state never overestimates the objective function value of any feasible state which can be derived as a descendant of it. Our state evaluation function is particularly simple: I t assigns to any state its makespan. This has the monotone property. If the state evaluation function has the mono- tone property then the first feasible state investigated is guaranteed to be optimal.

Thus, at each step of the A* search process, we select the most promising state which has been generated but not further investigated (“expanded”). The most promising state is the first in a priority queue whose members are ranked by makespan with lowest makespan first. If the selected state has no resource conflict, then an optimal schedule is found and the search process terminates successfully. Otherwise, we expand the selected state by discovering and using a disjunctive constraint to generate the state’s successors. Newly generated states are then added to the set of states which have not yet been expanded. Again the most promising state is selected and the process continues. Because the makespan associated with any state is guaranteed to be less than or equal to the makespan of any descendant state, makespan of the current state never overestimates the makespan of the best feasible solution that can be found by examining its descendants. This is the property of the heuristic state evaluation function which guarantees that the first feasible solution identified by the A* algorithm will be optimal.

In expanding any state which contains one or more violations of resource constraints. our algorithm looks for the smallest time t such that a resource violating set of activities are in progress in ( t , t + 1). This value of t is called RVST (for “resource violating set time”). Knowing RVST, activities can be classified into two sets: (1) the scheduled set of all activities which finish at or before RVST and (2) the unscheduled set of all activities which finish after RVST. Note that the unscheduled set may contain activities which start before RVST and continue until RVST + 1 or beyond, activities which start at RVST, and activities which start at o r after RVST + 1.

When two or more states have the same makespan, tie-breaking is required in selecting the most promising state. Among states with lowest makespan, we select one with highest RVST. A high RVST indicates that a state may be “close” to feasible; correcting remaining resource violations may require smaller increases in makespan. If a tie remains after applying this rule, a state is selected arbitrarily.

As mentioned above, a child state is created from its parent by the addition of one arc. This guarantees that a particular violating set in (RVST, RVST + 1) will no longer occur in this time interval. Our pruning rules are designed so that some child states are merely intermediate states which do not enter into the pruning process. If state S has been saved for pruning comparisons then its

Page 7: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 67

descendants are saved only if they advance the resource violating set time by at least one unit and augment the scheduled set of activities by at least one new activity.

Increasing RVST by at least 1 time unit requires all resource violating sets in (RVST, RVST + 1) to be corrected. However, only “minimal resource violat- ing sets” (MRVSs), which have no proper resource violating subsets, are con- sidered in sequencing decisions. For example, consider one resource with avail- ability 6 and four activities all in progress in (RVST, RVST + 1): a l , a2, a3, and a4 with requirements for 1, 2, 3, 4 units respectively of this resource. Then (a1 a2 a3 a4) would be a resource violating set but the only MRVS’s would be (a1 a2 a4) and (a3 a4). Appropriate disjunctive constraints are selected and child states created by adding new precedence arcs. In general, many choices are available, leading to a high branching factor in the search space. There are m(m - 1) choices of arcs to add to break up a MRVS of cardinality m. This creates a high branching factor when m 2 3.

Having established our philosophical approach of adding precedence arcs to break up resource violating sets and having observed that there can be a high branching factor when new disjunctive constraints are discovered, it is important to design an algorithm which generates a search tree of manageable size. Success in this effort depends on the branching factor and the power of pruning rules. For a fairly large project with very tight resource conflicts, the search tree grows quickly beyond a tolerable level. Moreover, to create a monotone heuristic state evaluation function, we were forced to be rather conservative. Our function is not particularly effective and the algorithm behaves almost like a breadth-first search algorithm. Without effective pruning, the performance of our algorithm would be significantly degraded.

First, we will discuss the two pruning rules employed. Then we will compare the two algorithms that result from (1) imposing exactly the kind of disjunctive constraints discussed above and (2) imposing weaker constraints. We shall call these approaches “strongly constrained” and “weakly constrained,” respec- tively. As mentioned above, the weakly constrained approach provides for a faster algorithm.

Schrage’s left-shiftable pruning rule was already mentioned. Whenever an activity in the scheduled set of state S can be left-shifted, state S can be pruned. If left-shiftable activity a in the scheduled set of state S has start time t in (the schedule of) S, then a will have start time t and will still be left-shiftable in all states which are descendants of S. Since there is no reason to consider feasible schedules which include one or more left-shiftable activities, we need not con- tinue to consider S or to develop and investigate any of S’s descendants. The second pruning rule involves the comparison of two states S and S’ to conclude that the best feasible schedule derivable from S must be at least as good 2s the best feasible schedule derivable from S‘. This will be the case when S is no more constrained than S’ (in some well-defined sense). We have chosen to implement this “dominance” pruning rule as follows: S weakly dominates S’(and thus S’ may be pruned) if:

(1) set of activities A,,).

S and S’ have the same scheduled set of activities As (and thus the same unscheduled

Page 8: Solving resource-constrained project scheduling problems by a* search

68 Naval Research Logistics, Vol. 37 (1990)

( 2 ) The precedence networks of S and S’ have the same subsets of arcs connecting pairs of activities in A,,. (3) The schedule of S has start times for activities in A,, which are less than or equal to the corresponding start times in the schedule of S’ .

This rule is useful in part because it allows us to ignore the start times of activities in As when comparing two states S and S ’ . For S, S’ and any states descendant from them: any resource violating set will be a subset of A,, and any arc emanating from any activity a in A,, will lead to some activity b also in A,. Thus only arcs connecting pairs of activities in A,, will ever be used for propagating changes in start times. When a child state is created, its schedule is determined by first copying that of its parent, then propagating required changes based on the newly added arc.

This dominance pruning rule has proven very useful. We have reflected at length on our algorithm design to attempt to maximize its power. In particular, it was helpful to keep in mind condition (2). The general principle of adding the strongest possible constraints to a particular state in creating its children ofter: leads to a search tree with many states S and S’ satisfying (1) but violating ( 2 ) because particular arcs have been added connecting pairs of activities in A,, in S (or S’) which are not present in S’ (or S ) . On the other hand, for our chosen approach of adding weaker constraints, condition (2) proves to be superfluous. Any states S and S’ satisfying (1) will satisfy (2) because the only arcs present connecting pairs of activities in A,, will be those present in the original precedence network (of the root state of the search tree).

Having identified a state S , its RVST and set of MRVS’s for that RVST, the strongly constrained approach eliminates all resource violations in the time interval (RVST, RVST+ 1) by choosing an MRVS with m members, creating child states by adding in turn one of the m(m-1) possible arcs to eliminate this MRVS, investigating for each child state which (if any) MRVS’s still remain in (RVST, RVST + l), choosing one such MRVS, continuing the process by ad- ding any possible arc, etc., until descendant states result which have no more violating sets in (RVST, RVST + 1). All such descendant states will have their first violating set (if any) occur after (RVST, RVST+ 1) and will have their scheduled sets augmented by at least one activity when compared to the sched- uled set of S.

When an arc a - b is added to a state S in which a and b have durations d,, and dh and scheduled start times t,,, t,,, respectively, the immediate impact is to increase the scheduled start time of b to t,, + dL,. The effect of this is then propagated across all arcs emanating from b and this propagation process continues in an obvious way until it dies out. Of course, the arc a + b remains in the network and might take part in start time propagation in some descendant state if, for example, some new arc c-a is added.

The weakly constrained approach can be viewed as using the following “weak alternative to adding arc a -+ b” to state S . A dummy activity z is added with duration dZ = r,, + d, . Activity z requires no resources and can be assigned start time 0. Arcs are added from the dummy start activity to z and from z to b. The immediate impact of this change to the network is again to increase the scheduled start time of b to r,,+d,,. The propagation process continues as in the strongly constrained approach. However, there is no arc added to the

Page 9: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 69

network which connects any pair of unscheduled activities. Thus no such arc will participate in propagation in some descendant state. I t is in this sense that the weakly constrained approach is weaker.

If we always employ the weakly constrained approach then we need never check condition (2) of the dominance pruning role provided condition (1) is satisfied. Since we add no arcs connecting pairs of original activities, we add no arcs connecting pairs of unscheduled activities. Thus any two states S and S' with the same unscheduled set A , must have the same subset of arcs for condition (2): those arcs in the network of the root state of the search tree which connect pairs of activities in A,.

Using the weakly constrained approach also allows for a lower branching factor in some instances. With the first violating set at RVST, both strong and weak approaches push the scheduled start times of certain activities to RVST + 1 or higher until no violating set remains in (RVST, RVST + 1). With the weakly constrained approach we need not consider all possible ways of doing this. Indeed, for a violating set V with m members, we need consider only m possible modifications of the network. For each activity b in V , we consider only the possibility of the weak alternative to adding an arc a+b where a is an arbitrary member of the subset of V - {b} with earliest finish time. Thus activity start times are pushed as little as necessary into the future to remove violating sets in (RVST, RVST + 1). The branching factor in this oper- ation is thus reduced from m(m - 1) for the strongly constrained approach to m for the weakly constrained approach.

It may seem a bit counterintuitive that our algorithm performs better when we identify a constraint that must be satisfied, but choose to add a weaker one. Indeed, there is no guarantee of better performance with this weaker approach even though we have seen that a lower branching factor results and condition (2) will never play a role in eliminating two states S and S' being considered for dominance pruning. The reason that better performance cannot be guaran- teed is that by (1) considering only alternatives which push start times of activities as little as possible into the future and (2) not adding any new arcs between unscheduled activities, the same violating sets can occur in descendant states at later times. With strong constraints, any violating set eliminated by an arc addition can never reoccur in a descendant state. Nevertheless, our computational experience shows that the weaker approach allows for significant pruning which more than makes up for the occasional reoccurrence of a violating set.

The example in Figure 1 can be used to illustrate both the strong and weak approaches. Figure 2 shows that at time 4 there is one MRVS: (a2 a6 a7). The strong approach then suggests adding in turn each of the six possible distinct directed arcs connecting pairs of activities in (a2 a6 a7). These arcs are' listed in Figure 3(a) along with the activity whose start time is pushed beyond time 4. Figure 3(b) then shows the six resulting schedules. Dominance pruning can then be employed to eliminate three of these schedules. The three remaining child states are shown in Figure 4(a)-4(c).

Using the weakly constrained approach with the initial state and schedule shown in Figure 1, we again identify the violating set (a2 a6 a7} at RVST 4. The arcs to be considered now are only {a7+a2, a2+a6, a2+a7}. These

Page 10: Solving resource-constrained project scheduling problems by a* search

70 Naval Research Logistics, Vol. 37 (1990)

Time, t Active set in (t, t + 1) MRVSs

0 {a2 a3 a4) NIL 1 {a2 a3 a4) NIL 2 {a2 a3 a4) NIL 3 {a2 a3) NIL 4 {a2 a5 a6 a7} {(a2 a6 a7)) 5 {a2 a6 a7} {(a2 a6 a7)} 6 {a6 a8 a9 a10 a l l } 7 {a6 a9 a10 a l l } 8 {a6 a9 a10) {(a6 a9 alo)} 9 {a6 as} NIL

10 {a121 NIL 11 I a W NIL 12 {a 121 NIL 13 b13) NIL 14 b13) NIL 15 {a131 NIL 16 {a131 NIL 17 {a131 NIL

Makespan = 18 First Resource Violating Set Time (RVST) = 4 Scheduled Set = {a3 a4) Unscheduled Set = {a2 a5 a6 a7 a8 a9 a10 a l l a12 a13)

{(a9 a10 a l l ) (a6 a10 a l l ) (a6 a9 a l l ) (a6 a9 alo)} {(a9 a10 a l l ) (a6 a10 a i l ) (a6 a9 a l l ) (a6 a9 alo)}

Figure 2. Initial schedule and minimal resource violating sets for simple example.

(a) arcs activity pushed

a6-t a2 a2 a7 + a2 a2 a2 -t a6 a6 a7 + a6 a6 a2 -+ a7 a7 a6- a7 a7

(b) added arc new RVST scheduled set new start time-vector

a6+a2 19 {a2 a3 a4 a5 a6 a7 a8 a10 a l l }

a7-+a2 15 {a2 a3 a4 a5 a6 a7 a8 a10 a l l }

a2+a6 5 {a2 a3 a4 a5 a7) a 7 - + a 6 5 {a2 a3 a4 a5 a7} a2+a7 6 {a2 a3 a4 as} a6+a7 6 {a2 a3 a4 as}

(0 10 0 0 4 4 4 6 16 16 9 19 22 27)*

(0 6 0 0 4 4 4 6 12 12 6 15 18 23)

(0 0 0 0 4 6 4 6 6 6 6 12 15 20) (0 0 0 0 4 6 4 6 6 6 6 12 15 20)** (0 0 0 0 4 4 6 8 6 6 8 10 13 18) (0 0 0 0 4 4 10 12 6 6 12 14 17 22)***

*dominated by a7 - a2 **dominated by a2 + a6 ***dominated by a2- a7

Arcs to be considered = {a7- a2, a2- a6, a2-t a7)

Figure 3. (a) All possible arcs to add for breaking up the first minimal resource violating sets, {(a2 a6 a7)) for simple example. (b) Use of dominance pruning in comparing child

states created by adding one arc to simple example.

Page 11: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 71

are exactly the three undominated alternatives used in the strongly constrained approach. Unfortunately, small examples such as this one do not provide con- vincing demonstrations that the weakly constrained approach tends to run faster and require less memory.

The algorithm (for either the strong or weak approach) can be described by the procedures A *-Schedule and Descendants with pseudocode presented below. Line numbers are for discussion purposes only and are not used by the algorithm. In presenting an overview of the algorithm, the pseudocode obvi- ously hides issues of specific data structures used to maximize efficiency. One such issue that should be mentioned is that the weakly constrained approach can be implemented without explicitly adding additional arcs and dummy activi- ties. Still it may be useful to think of this approach as it was described above.

The left-shiftable and state dominance pruning rules discussed above are very useful since they completely eliminate states which would otherwise have to be examined and expanded. When one of these rules is employed successfully, a possibly large section of the search tree is lopped off. We should also mention that the algorithm maintains an upper bound (initially infinite), the lowest makespan of any feasible solution found so far. Any state generated can be immediately discarded if its makespan is greater than or equal to the current upper bound value. This upper bound is easily implemented but not nearly as valuable as the two pruning rules discussed above. This is because the A*

Time, t Active set in (t, t + 1) MRVSs

0 1 2 3 4 5 6 7 8 9

10 11 12 13 14 15 16 17 18 19 20 21 22

{a3 a4) {a3 a4} {a3 a4) {a31 {a5 a6 a7) {a6 a7) {a2 a6 a8 a l l } {a2 a6 as} {a2 a5} {a2 as} {a21 {a21 {a9 a10) {a9 a10) {a9 alO} {a9 a12) {a 121 {a12} la131 b13)

{a131 {a131

w 3 )

NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL

NIL NIL NIL NIL NIL NIL NIL

{(a9 a1211

Makespan = 23. First Resource Violating Time = 15. Scheduled Set = {a2 a3 a4 a5 a6 a7 a8 a10 all}. Unscheduled Set = {a9 a12 a13).

Figure 4a.

Page 12: Solving resource-constrained project scheduling problems by a* search

72 Naval Research Logistics, Vol. 37 (1990)

Time, t Active set in (t, t + 1) MRVSs

0 {a2 a3 a4) NIL 1 {a2 a3 a4) NIL 2 {a2 a3 a4} NIL 3 {a2 a3) NIL 4 {a2 a5 a7} NIL 5 {a2 a7) NIL 6 {a6 a8 a9 a10 al l} 7 {a6 a9 a10 a l l } 8 (a6 a9 a10) NIL 9 {a6 as} NIL

10 {a61 NIL 11 NIL 12 {a121 NIL 13 {a121 NIL 14 {a121 NIL 15 {a13} NIL 16 {a131 NIL 17 {a131 NIL 18 b13) NIL 19 b13) NIL

{(a9 a10 a l l ) (a6 a10 a l l ) (a6 a9 a l l ) (a6 a9 alo)} ((a9 a10 a l l ) (a6 a10 a l l ) (a6 a9 a l l ) (a6 a9 a10)}

Makespan = 20. First Resource Violating Time = 6. Scheduled Set = {a2 a3 a4 a5 a7). Unscheduled Set = {a6 a8 a9 a10 a l l a12 a13}.

(b)

Time, t Active set in (t, t + 1) MRVSs

0 {a2 a3 a4) NIL 1 {a2 a3 a4) NIL 2 {a2 a3 a4) NIL 3 {a2 a3) NIL 4 {a2 a5 a6) NIL 5 {a2 a6) NIL 6 {a6 a7 a9 alO} {(a6 a9 alo)} 7 {a6 a7 a9 a10) {(a6 a9 aIO)} 8 9 {a6 a9 a10) {(a6 a9 alo)}

{a6 a8 a9 a10 a l l } {(a9 a10 a l l ) (a6 a10 a l l ) (a6 a9 a l l ) (a6 a9 alO)}

10 Ia12) NIL 11 I a W NIL 12 {a121 NIL 13 { a W NIL 14 ~ 3 ) NIL 15 {a131 NIL 16 {a131 NIL 17 I a W NIL

Makespan = 18. First Resource Violating Time = 6. Scheduled Set = {a2 a3 a4 as}. Unscheduled Set = {a6 a7 a8 a9 a10 a l l a12 a13).

(c)

Figure 4. (a) New schedule after adding a7+a2. (b) New schedule after adding a2 +a6. (c) New schedule after adding a2 +a7.

Page 13: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 73

algorithm would terminate before examining and expanding such states. Thus use of the upper bound saves memory but does not reduce the number of states expanded (i.e., the number of iterations through the main WHILE loop of procedure A*-Schedule described below).

The procedure A*-Schedule takes as input the description of the Initial-State, At Line 2, the Upper-Bound is initialized to be infinite. At Line 3 , the list OPEN is constructed and initialized to contain the single element, Initial-State. OPEN is an ordered list of states which have been identified but not yet examined. The first element in the OPEN list is made the Current-State at Line 5 and is removed from OPEN at line 6. Rest(List) is the list composed of all but the first element of List. (First and Rest correspond to car and cdr in Lisp,) At Line 7, the MRVS’s of the Current-State are identified. At Line 11, Descendants identifies a list of new states which each have advanced the RVST and augmented the set of scheduled activities of Current-State.

The procedure Descendants is called recursively. Its two parameters are the state to examine immediately and the root state of the search tree. The Merge process inserts newly found states into appropriate positions in OPEN so that OPEN remains ordered lexicographically by makespan and then RVST.

Procedure Descendants performs the generation of new states to add to OPEN by creating and returning the list New-States. A t Line 3 , Augmented- State is created by adding one arc to State (or with the weak approach, by the weak equivalent). At Line 4, Augmented-State is examined to see if its make- span is less than Upper-Bound; if not it is discarded. At Lines 5 and 6, if Augmented-State is feasible and its makespan is less than Upper-Bound, Upper- Bound is updated to the makespan of Augmented-State. At Line 7, the Aug- mented-State is examined to see if it is left-shiftable; if so it is discarded. At Line 8, the RVST’s and scheduled sets of activities of Augmented-State and Root-State are compared. If the RVST’s are different and the scheduled sets are different then Augmented-State is a descendant which should be rememb- ered. In this case, Augmented-State is first compared to existing states with the same scheduled set of activities to see if Augmented-State is dominated. If not dominated, Augmented-State is recorded in the list of New-States at Line 9. (The operation “+ ” is equivalent to “append” in Lisp.) Otherwise, Augmented- State is an intermediate state from which descendants must be generated; this is done in Line 10.

PROCEDURE A*-Schedule (Initial-State) 1 Scheduling-Done c NIL; 2 Upper-Bound t x ;

3 OPEN t List(Initia1-State); 4 WHILE Scheduling-Done = NIL DO 5 Current-State tF i r s t (0PEN) ; 6 OPEN t R e s t ( 0 P E N ) ; 7 8 Report-Optimal-Schedule(Current-State) ; 9 Scheduling-Done t T;

IF MRVSs(Current-State) = NIL THEN

10 ELSE 11 OPEN t Merge(Descendants(Current-State, Current-State), OPEN).

Page 14: Solving resource-constrained project scheduling problems by a* search

74 Naval Research Logistics, Vol. 37 (1990)

PROCEDURE Descendants(State, Root-State)

9

10

11

New-States +NIL; FOR Arc in Arcs-To-Add(MRVSs(State))DO

Augmented-State t Add(Arc, State); IF Makespan(Augmented-State) < Upper-Bound THEN

IF MRVSs(Augmented-State) = NIL THEN Upper-Bound t Makespan(Augmented-State);

IF Not(Left-Shiftable(Augmented-State)) THEN IF New-RVST-and-Sched-Set(Augmented-State, Root-State)

And Not(State-Dominated(Augmented-State) THEN New-States t List(Augmented-State) + New-States;

ELSE New-States t Descendants(Augmented-State, Root-State) + New-States;

RETURN New-States.

Although the state dominance rule requires more complicated steps and some extra memory, it is very effective in eliminating some states immediately after they are created. We have given examples of the use of this rule in comparing child states derived from expanding a single parent state. It is also helpful to record states which have appeared elsewhere in the search tree and to compare newly generated states to them. Each state has a well-defined scheduled set. For the dominance pruning rule, another set of states CLOSED is used. CLOSED keeps all the states which have been generated so far. Therefore a new state is recorded not only in OPEN but also in CLOSED. A newly genera- ted state which is not left shiftable is compared to all states in CLOSED with the same scheduled set.

The state dominance concept can be strengthened to include pruning of existing states by a new state S as well as pruning of S by existing states. Thus pruning is possible when either: (1) a new state S is dominated by a state in CLOSED, or (2) a new state S dominates a state in CLOSED. In both cases, only the dominating state is kept in both OPEN and CLOSED.

Reviewing the performance of our algorithm in our example. Figure 5 shows the complete search tree for the weakly constrained approach without pruning. States are indexed S1, S2, etc. in the order of creation. State S4 can be dominance pruned by S12. Both states have the same scheduled set. As shown in Figure 6, S12 has earlier start times than S4 for unscheduled activities.

Starting with S1, we can choose to add either arc a2+a7 or a2+a6 or a7 4 a 2 . Adding a2+a7 does not increase the makespan. However, by adding a2 4 a 6 , the makespan increases from 18 to 20 and by adding a7 +a2, the makespan increases from 18 to 23. Because all three choices successfully in- crease the RVST and scheduled set of the initial state, they are pushed into OPEN as legitimate new states, S2, S 3 , and S4.

Now OPEN is ordered as (S2 S3 S4). S2 is then selected and expanded. The process is continued until a network with no resource violating sets is finally

Page 15: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 75

initial schedule (a2 a6 a7)

S2: 18:6

(a9nlOall) (a6a10all) (a6 a9 a1 1) (a6 a9 al0) (a6 a9 a10)

legend :

dominated by S12

Figure 5. Search tree for the simple network example.

state scheduled set 54 s12

unscheduled activities s4 512

a9 12 9 a12 15 12 a13 18 15

{a2 a3 a4 a5 a6 a7 a8 a10 a l l ) (s2 a3 a4 a5 a6 a7 a8 a10 a l l}

Start times

Figure 6. An example of state-dominance pruning.

Page 16: Solving resource-constrained project scheduling problems by a* search

76 Naval Research Logistics, Vol. 31 (1990)

Figure 7. (a) Resource usages of state S6 before a7 is left-shifted. (b) Resource usages of state S6 after a7 is left-shifted,

Page 17: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 77

selected from OPEN. One possible order of execution of A*-Schedule with pruning gives the following values of OPEN at line 3 in successive passes through the main WHILE loop:

(S2 S3 S4)

(S5 S3 S7 S4); S6 is left-shiftable as shown in Figure 7(a), (b) and thus dropped (S8 S3 S10 S7 S4); S10 is placed before S7 because RVST’s of S10, S7 are 9, 8, respectively. S9 is left-shiftable and thus dropped

(S11 S12 S3 S10 S7 S13); S12 is placed before S3 because RVST’s of S12, S3 are 11, 6, respectively. S4 is dominated by S12 as shown in Figure 7 and thus dropped. A feasible solution, S13, is discovered and the upper bound is updated to 25 which is the makespan of S13.

(S14 S12 S3 S10 S7 S13); a feasible solution, S14 is discovered and the upper bound is updated to 19.

S14 is then removed from OPEN. Since it is feasible, it is optimal and the minimal makespan is 19.

5. IMPLEMENTATION DETAILS AND COMPUTATIONAL EXPERIENCE

In comparing our approach to that of [9], we crudely approximated for one 43-activity problem the sizes of respective search trees that would grow if no pruning was employed. Stinson’s and our algorithms would have generated about 1.7*1012 and about 4.9*10” states, respectively. Thus our search tree would have been bigger by a factor of 290,000. The actual number of states generated and placed on OPEN by our algorithm was 2,633 and the number of states investigated (expanded) was 751. Thus many states placed on OPEN were unexplored at the time the A* algorithm called for the removal of the first feasible solution from OPEN. This is one of the primary benefits of the A* algorithm with monotone heuristic evaluation function.

For implementing our algorithm, choosing the right data structures may upgrade performance greatly. Because sets OPEN and CLOSED can grow quickly, it would be very inefficient to maintain such sets by using a common setlike data structure. In our algorithm, a hash table is chosen for implementing OPEN and CLOSED.

A hash table comprises a set of entries, which map a key to a value. In general, the speed of the mapping process is fairly fast. For OPEN, makespan acts as key and states are listed as values for each key. By doing that, the algorithm must access only a small portion of OPEN at any one time. Figure 8 shows the state of OPEN after expanding the initial schedule. State S2 is stored in OPEN( # 18), S3 in OPEN( #20), and S4 in OPEN( #23).

Page 18: Solving resource-constrained project scheduling problems by a* search

78 Naval Research Logistics, Vol. 37 (1990)

Figure 8. An implementation of OPEN using a hash table.

Another hash table is used for CLOSED. For an n-activity problem, a key would be an n-component bit vector, called Scheduled-Vector (S-Vector). Each index in this bit vector represents an activity and the values 0 and 1 represent unscheduled and scheduled, respectively. When a comparison for dominance pruning takes place, only states with the same S-Vector are accessed. This will speed up comparisons significantly. Memory can be saved because the S-Vector does not have to be saved separately for each state. Figure 9 shows the state of CLOSED after completion of the search process.

For the experiment with our algorithm, 110 test problems provided by Patter- son and used in [2a] and [6] were tested. Number of activities of each problem varies from 8 to 51. However, most problems have over 22 activities. Problem identification numbers agree with those in [6].

keys cnoics

((S2))

%1111101OOOOOOO ((S3 s5 S7) 1 I 1

((S11 S12))

#1111101101M)Oo ((SS))

( (S 10) 1

*S4 is run& by S12. ** S6 k 9 arc pruned by

left-shiftable mk.

Figure 9. An implementation of CLOSED using a hash table.

Page 19: Solving resource-constrained project scheduling problems by a* search

Tabl

e 1.

C

ompu

tatio

nal r

esul

ts f

or 1

10 p

robl

ems.

(sec

.)

No.

of

No.

of

No.

of

stat

es

Prob

. N

o. o

f N

o. o

f In

itial

O

ptim

al

CPU

st

ates

st

ates

pr

uned

by

No.

A

cts

Arc

s m

ks

mks

tim

e ge

nera

ted

expa

nded

le

ft-s

hift

St

ate

dom

inan

ce

1 2 3 4 5 6 7 8 9 10

11

12

13

14

15

16

11

18

19

20

21

22

23

24

25

26

27

28

29

30

14 7 13

22

22

22 9 9 18 8 8 23

22

35

35

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

20 8 14

35

35

35

10

11

29

11

11

31

30

55

51

34

35

34

35

32

32

34

33

35

35

35

33

34

35

33

18 6 18 6 6 6 8 8 19

14

14

10

13

41

39

30

22

30

22

37

37

31

20

37

31

31

32

32

22

26

19 1 20 6 7 8 8 11

19

14

18

13

20

43

41

32

29

41

31

37

48

36

32

40

33

43

36

43

29

32

9 3 8 2 3 4 4 4 34 2 3 68

1216

65

33

14

1 21

3 13

0 51

1 25

189

249

175

116 12

139

145

129

210

187

15 6 16 0 5 7 11

12

44 0 5

114

1196

69

29

18

6 39

3 16

6 70

8 31

211

276

256

152 17

18

7 18

0 14

2 28

5 25

1

5 2 6 0 1 2 4 5 7 0 2 32

245 20

10

53

115 61

189 9 85

55

81

44 5 67

46

51

70

72

2 0 0 0 0 0 0 0 14 0 0 10

402 1 3 18

40

2 91 8 10

47 7 24 1 1 14

10

62

27

1 0 0 0 0 2 0 0 0 0 0 10

337 13 2 50

144 47

249 4 79

10

5 73

41 1 57

58

46

99

102

E c lu 3 a 9,

Page 20: Solving resource-constrained project scheduling problems by a* search

to

Tab

le 1

. (C

onti

nued

).

0

(sec

.) N

o. o

f N

O. o

f N

o. o

f st

ates

Pr

ob.

No.

of

No.

of

Initi

al

Opt

imal

C

PU

stat

es

stat

es

prun

ed b

y N

o.

Act

s A

rcs

mks

m

ks

time

gene

rate

d ex

pand

ed

left-

shift

st

ate

dom

inan

ce

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

22

27

27

27

34

32

32

32

35

33

35

35

33

34

34

36

36

34

34

33

33

24

24

32

32

40

64

68

68

68

32

43

40

43

26

22

22

22

27

32

22

22

30

27

33

28

28

31

31

25

25

18

18

21

18

22

24

27

27

27

21

30

29

35

35

22

31

30

31

33

28

30

31

31

36

28

41

31

39

33

35

23

18

25

25

27

28

50

29

27

21

35

31

39

173 22

325

368

216

105

180

123

104

156

196 75

367 28

155

353

282

519 4

285

1091

47

5 33

65

21 4 3

176 94

98

209 31

439

497

281

152

278

183

129

232

259

124

417 35

19

5 46

7 38

3 59

8 5 36

0 12

43

662 51

80

27

5 0 20

8 12

9 11

2

66 9

151

179 70

38

75

60

28

66

72

36

157 10

70

132

115

143 1 91

306

175 15

33 7 1 0 53

33

27

27 4 40

48

66

12

43

36 9 20

12 7 49 5 27

27

41

120 0 87

197

125 5 1 1 0 0 9 8 1

61 0

130

173 78

20

84

61

37

44

89

13

186 2 65

196

132

216 0

115

539

280 20

44

12 0 0 67

35 9

s %. 2.

6: c 0

Page 21: Solving resource-constrained project scheduling problems by a* search

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

27

27

27

27

27

27

27

27

27

27

27

27

27

27

27

27

21

21

27

27

21

27

27

27

27

27

27

27

27

21

27

27

27

27

27

42

40

42

40

41

43

42

40

40

39

41

39

41

40

40

40

41

41

41

41

41

41

41

41

41

41

42

44

39

37

38

36

36

38

39

32

30

34

33

37

32

22

39

26

30

29

30

29

29

29

29

31

31

31

31

31

31

31

31

31

31

23

36

30

34

33

26

25

35

29

36

37

40

37

40

38

27

41

30

31

32

41

36

30

34

43

64

53

45

38

38

36

34

33

31

31

29

40

31

39

35

28

26

36

33

128

476

202

582

236 41

40

2 15

5 43

2 38

4 30

5 3 1

89

607 53

245 88

16

31

1249

67

1 42

7 27

1

51

23

10 8 6

592

125

117

3452

34

0 39

5 20

7 13

1 12

1

150

525

221

63 1

254 48

45

3 17

9 54

1 38

0 33

1 22

38

566 71

230

104

984

879

564

'

419

313 54

23

10 8 5

680

142

138

2792

35

3 43

9 25

4 13

8 13

3

35

132 61

123 6.5

13

95

43

132 84

75

572

130 19

71

41

35 1

31

2 17

5 11

0 75

15 6 2 2 1

175 37

31

525 78

90

64

29

33

4 34

14

68 9 0 21

16

67

84

60

476

101 7 23 3 33

60

92

48

26 6 2 0 0 0 69

26

14

317 37

99

74

59 9

23

167 80

155 69 7

122 24

128

141 61

863

138 11

75

32

49 1

38

9 19

2 11

1 69 8 1 1 0 0

193 38

13

922 84

115 54 7 36

W 3 a 5; b

Page 22: Solving resource-constrained project scheduling problems by a* search

Tab

le 1

. (C

ontin

ued)

. 03

h)

(sec

.)

No.

of

No.

of

No.

of

stat

es

Prob

. N

o. o

f N

o. o

f In

itial

O

ptim

al

CPU

st

ates

st

ates

pr

uned

by

No.

A

cts

Arc

s m

ks

mks

tim

e ge

nera

ted

expa

nded

le

ft-s

hift

st

ate

dom

inan

ce

96

27

97

27

98

27

99

27

100

27

101

51

102

51

103

51

104

51

105

51

106

51

107

51

108

51

109

51

110

51

36

34

38

39

37

85

81

87

81

86

78

77

76

80

70

23

26

35

31

29

71

83

56

78

76

58

78

60

57

50

26

30

41

37

33

75

83

56

79

77

60

78

61

60

50

240

396

2267

75

5 74

7 80

5 33

7 43

151

343

210

111

2073

85

1

597

309

427

1829

71

8 75

8 42

9 19

1 33

80

200

146 65

1127

46

5 37

3

77

99

462

164

172

122 54 8 25

57

38

21

24 1

10

9 10

0

73

77

186

124

160 93

52

2 8 44

28 8

228

112 91

92

85

574

215

275

150 32 5 14

50

48 7

382

159

131

6 2.

z.

8

Page 23: Solving resource-constrained project scheduling problems by a* search

Bell and Park: A* Algorithm 83

These networks were generated under procedures which produced problems with network structure and resource requirements similar to those encountered by the authors in practice. For example, the ratio of number of arcs to number of activities varied between 1.0 and 3.0. Each activity had fixed multiple-unit requirements of three different resource types except 7 problems: problems 7, 8,9, and 14 needed 1 resource and problems 10, 11, and 15 needed 2 different resources.

Computations were performed on an Apple Macintosh Plus using a version of Common Lisp. Several measures were recorded such as CPU time, total number of states generated, number of states expanded, and number of states pruned by the left-shiftable and state-dominance rules. All detailed information is shown in Table 1.

For problem 16, 141 seconds were required to get an optimal schedule of makespan 32. In total, 186 states were generated and among those only 53 states were actually examined. The left-shiftable rule pruned 18 states and the state-dominance rule 50 states.

Table 2 shows summarized results. Among 110 test problems, 75 problems were solved in less than 300 seconds and 96 problems were solved in less than 600 seconds. However, it took more than 1,000 seconds to solve each of 8 problems.

Computational results can be summarized as follows:

Regardless of problem size, our algorithm performs better for less resource-constrained

Both pruning rules cut down the search process effectively. However, the state-domin- problems.

ance rule outperforms the left-shiftable rule.

With the help of two pruning rules, our algorithm performs reasonably. The state-dominance rule is a more decisive factor in determining performance. We were somewhat surprised that effective performance of the state-dominance rule was enhanced by adding weaker constraints instead of the stronger, more

Table 2. Number of problems solved in each time range for 110 test problems. (sec.) CPU time Number solved Cumulative

0-99 100-199 200-299 300-399 400-499 500-599 600-699 700-799 800-899 900-999 1000-1499 1500-1999 2000-2499 2500-2999 3000-3499

36 26 13 11 5 5 2 2 2 0 3 1 2 0 2

36 62 75 86 91 96 98

100 102 102 105 106 108 108 110

Page 24: Solving resource-constrained project scheduling problems by a* search

84 Naval Research Logistics, Vol. 37 (1990)

natural disjunctive constraints discovered by examining violating sets of activi- ties. The weakly constrained approach benefits from a lower branching factor when adding arcs to break up a violating set of cardinality 3 or greater. Also this approach involves the creation of child states which in some sense differ less from their parents than in the strongly constrained approach. The search tree then contains states which are in some sense more homogeneous and more likely to pass the tests for dominance pruning.

ACKNOWLEDGMENTS

The work of Colin Bell was supported in part by a University of Iowa College of Business Administration Summer Faculty Research Award. Additional sup- port was provided by DARPA/BRL Grant No. DAAA15-87-K-0001 awarded to Yale University, Drew McDermott, Principal Investigator. Discussions of this work with Professor McDermott were particularly beneficial. Kwangho Park's research was supported by an H.R. and Alberta B. Ponder Research Award for 1988 Summer Research from the University of Iowa College of Business Administration.

REFERENCES

111 Bell, C. E., and Han, J . , "A New Heuristic Solution Method In Resource-Con- strained Project Scheduling," Naval Research Logistics, submitted.

[2] Charniak, E. , and McDermott, D. , Introduction to Artificial Intelligence, Addison- Wesley, Reading, MA 1985.

[2a] Davis, E. W., and J. H . Patterson, "A Comparison of Heuristic and Optimum Solutions in Resource-Constrained Project Scheduling," Management Science 21(8),

[3] Han, J . , "A New Heuristic Algorithm for Resource-Constrained Project Schedul- ing," Unpublished Ph.D. dissertation, Department of Management Sciences, Uni- versity of Iowa, 1988.

[4] Hart, P. E., N. J . Nilsson, and B. Raphael, "A Formal Basis for the Heuristic Determination of Minimum Cost Paths," IEEE Transactions on Systems, Science, and Cybernetics, SSC-4(2), 100-107 (1968).

[S] Hart, P. E., N. J. Nilsson, and B. Raphael, correction to "A Formal Basis for the Heuristic Determination of Minimum Cost Paths," SIGART Newslerter, 37, 28-29 ( 1972).

[6] Patterson, J. H . , "A Comparison of Exact Approaches for Solving the Multiple Constrained Resource Project Scheduling Problem," Management Science, 30(7),

944-955 (1975).

854-867 ( 1984). [7] Rich, E. , Artijicial Intelligence, McGraw-Hill, New York, 1983. [8] Schrage, L., "Solving Resource-Constrained Network Problems by Implicit

Enumeration-Non Preemptive Case," Operations Research, 18, 263-278 (1970). 191 Stinson, J. P . , E. W. Davis, and B. M. Khumawala, "Multiple Resource-Con- _ _

strained Scheduling Using Branch and Bound," A I I E Transactions, 10(3), 252-259 (1978).

Manuscript received April 4, 1989 Revised manuscript received June 26, 1989 Accepted September 13, 1989