0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 367
Tijdschrift voor Economie en Management Vol. LII, 3, 2007
Resource Allocation in Activity Networks under Stochastic Conditions: A Geometric Programming-Sample Path Optimization Approach By S. E. ELMAGHRABY and C. D. MORGAN
Salah E. Elmaghraby North Carolina State University Raleigh, NC, 27695-7906
[email protected]
Clayton D. Morgan Wishard Investment Group 3141 John Humphries Wynd, Suite 265, Raleigh, NC, 27612
[email protected]
ABSTRACT We depart from the conventional ‘resource constrained project scheduling problem’, better known under the acronym RCPSP, by adding the element of randomness to the activities. In particular, we assume that each activity in the project has a work content that is exponentially distributed. The duration of an activity is then modeled as a function of the random work content and the allocated resources; the exact functional relationship can be arbitrarily defined. The stochastic optimization problem is approached by a method that is a ‘marriage’ between geometric programming (GP) and sample path optimization (SPO) that is flexible and can be implemented in a modular fashion.
367
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 368
I. INTRODUCTION AND REVIEW OF LITERATURE Projects are defined as a finite set of activities that are required to achieve a specific objective; an activity is defined as an action that consumes time and resources (though, for technical reasons, we sometimes appeal to ‘dummy activities’ that require neither). Typically, the use of resources entails an expense that varies with the magnitude and duration of their use, and the project has a promised completion date which should be respected, else it incurs a tardiness penalty. In this paper we are concerned with the optimal allocation of resources to activities in projects under stochastic conditions in order to optimize an economic objective function composed of the sum of the cost of the resources used and the penalty incurred (reward accrued) if the project is completed later (earlier) than its promised completion date. This research may be viewed as an alternative view of the well studied ‘resource constrained project scheduling problem’ (RCPSP) which addresses the problem of how to schedule the activities while respecting the precedence relations and the availability of resources? For a comprehensive review of the gamut of problems under the rubric of RCPSP, the reader should consult the books by Demeulemeester and Herroelen [6] and Neumann, Schwindt and Zimmermann [22]. The context of our concern is projects in environments characterized by uncertainty, where activities are related by ‘ordinary’ precedence relations (as opposed to ‘generalized’ precedence relations, see Elmaghraby and Kamburowski [9]) and require resources for their execution. In a sense this paper extends to the stochastic environment the results presented in a previous paper by the same authors (see [20]) that dealt exclusively with the deterministic case in which the work content of each activity was assumed to be deterministically known. Planning and scheduling of activities under stochastic activity duration have received renewed attention lately. Although tangentially related to the topic of this paper, we would like to mention the two papers by Fu [11] and Groër and Ryals [14], and the chapter by Fu [12], all three of which deal with gradient estimation in stochastic AN’s (estimation of the impact of an individual activity duration on the total project duration). Project management, which we take to mean project planning and control, under stochastic conditions is a complex and challenging task. The difficulty with the analysis of stochastic activity networks (SAN’s) is that few purely analytical methods exist for the optimization of such
368
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 369
networks. The methods that do exist are tractable for only the smallest of problems. In order to be of practical utility for mid-size (50 to 150 activities) and large (over 150 activities) projects, which is our concern, new methods must be developed for achieving such a result. Closer examination of the project planning and control function reveals that a manager is primarily faced with a sequential (multi-stage) decision problem – the manager’s world is a dynamic world in which favorable as well as adverse conditions may occur, necessitating continuous adaptation to the ever-changing environment. A project starts with some resources and with possible commitment to other resources in the future. The ‘eligible’ activities – where eligibility is defined in terms of being sequence-feasible – seize the resources for some (random) amount of time until they are completed, then the resources are released calling for a new decision on reallocation to the next set of ‘eligible’ activities. This process repeats until the project is completed. The point of departure of our treatment (and the treatment in references [20], [24], [28]-[30] which adopt the same optic) from the conventional view of project planning and control are two. Firstly, we hold that managers manage resources, not the scheduling of activities as assumed in the RCPSP. Hence the decision variable is the amount of resource(s) allocated to each activity in the project. The duration of an activity is then the consequence of the resource(s) allocated to it, not its prime factor, as is commonly viewed. Secondly, that uncertainty resides in the work-content of the activity not, as commonly viewed, in its duration. Specifically, we assume that each activity in the project has a work content that is randomly distributed with some specified distribution. The duration of an activity is then modeled as a function of the random work content and the allocated resources. The exact functional relationship will be discussed in detail in Section II.B. A view that is akin to ours, albeit still different, is that of robust resource allocation1 under uncertainty, which is championed by several researchers of whom we cite the papers by Herroelen and Leus [17], [18], [19] (note the extensive list of references cited therein) and the doctoral dissertation of Stork [27]. The point of view of these studies stems from the assumption that resources cannot (or should not) be re-allocated ‘midstream’ in a project (because, for instance, of prior contractual agreements), hence it is desired to initiate the project with an allocation of resources and its corresponding ‘base-line 1
Alternatively referred to as ‘stable’, ‘invariant’, and ‘tolerant’ resource allocation.
369
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 370
schedule’ of the activities so that there shall be minimal changes in the resource allocation (though there may be changes in the schedule of the activities), as the project progresses. This view is quite different from the view of Tereso, Araújo, and Elmaghraby [28]-[30], who assume that changes in resource allocation to the remaining activities can indeed be undertaken by management at the time an activity is completed, or the view of Ramachandra and Elmaghraby [24], Elmaghraby and Ramachandra [10], and Morgan and Elmaghraby [20] who assume that changes in resource allocation can be undertaken by management at any time during the progress of the project – even midway during the execution of an activity. The intimate relationship between the resource allocation and the activity duration (and thus the project duration) was recognized early in the development of the field, see chapter 2 of the book by Elmaghraby [8] for a comprehensive review of the early attempts at time/cost trade-off optimization. This point of view has manifested itself in a recent contribution by Gutjahr, Straus and Wagner [16] who assumed that the manager has a finite set of alternative actions (which they call ‘measures’) that determine the resource allocation to a subset of the activities and their durations. Each action results in known resource costs; however, the impact of such action on the completion time of the project and the resulting tardiness penalty (if any) that may be incurred cannot be determined a priori because of the stochastic nature of the activities’ durations. To select the ‘near optimal’ action the authors had to rely on the stochastic branch-and-bound approach of Norkin, Pflug and Ruszcynski [25], appropriately modified to speed up the selection. This paper focuses on the single stage (or static) problem in which the objective is to secure the best resource allocation (in the sense of optimizing the expected project cost) taking the randomness in the work content into account. The more general goal of developing a procedure for the multi-stage (or dynamic) problem is the subject of another report. To address the problem of concern we had to consider several methodological approaches, which we briefly discuss next. Stochastic Approximation, a method originally introduced by Robbins and Monro [26] and later studied by Wolfowitz [31] was investigated but later abandoned because of the difficulty in dealing with constraints. In particular, Stochastic Approximation has trouble with the non-linear inequality constraints that are required in our model to enforce precedence relations among the activities. Furthermore, Stochastic Approximation, although possessing interesting theoretical
370
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 371
convergence properties, did not perform well in practice (relative to convergence) even for simple instances of the problem. The second approach we investigated was the popular meta-heuristic approach of Genetic Algorithms (GA). The GA approach encountered the same problem dealing with constraints as Stochastic Approximation and was too computationally burdensome when applied to midsize and larger problems (larger than 50 activities). In spite of these difficulties, Chu and Yao [4] proposed a GA methodology for the solution of the stochastic RCPSP which uses Monte Carlo Sampling (MCS). Later Chu, Yao and Tseng [5] proposed modifications to their original method that appear to increase the computational efficiency by an order of magnitude. In both cases the instances of the projects tested range from 11 to 22 activities and thus can be considered ‘small’ by our classification. To date, to the best of our knowledge, no further results have been published exhibiting the application of their method on mid-size (50-150 arcs) or large (>∞∞150 arcs) size projects. Azeron, Perkgoz and Sagawa [1] cast the problem as an optimal control problem which they readily admit cannot be solved analytically. Instead, a GA is proposed for the solution of the apparently intractable control problem. As with the aforementioned GA papers, the size of the networks optimized by Azeron et al. are smaller than 50 activities. Since our goal is to solve ‘mid-size’ and ‘large’ networks, GA was deemed to be unfit for our purpose. Dynamic Programming (DP) is yet another methodology that has been applied to the solution of the stochastic resource allocation problem. The reader may consult Tereso, Araújo and Elmaghraby [28], [29], for a concise description of the solution procedure via DP and the subsequent results using the procedure on a series of test networks. Although DP is elegant theoretically in the way it models the dynamic nature of the project management process, it suffers from severe problems computationally which are documented by the authors. For this reason DP is not practical for large projects. Realizing the shortfalls of DP, Tereso, Araújo, and Elmaghraby proposed an alternate approach using the novel Electromagnetism Algorithm (EMA) optimization method of Birbil and Fang [2]. Thanks to EMA they were able to get results far superior to the earlier DP results. For example they solved for the optimal resource allocation for a project of 76 (stochastic) activities in less than 8 hours using EMA, whereas with DP they were forced to abort the program after one week without obtaining results. It would seem that the EMA approach is
371
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 372
the ‘state of the art’ for the stochastic RCPSP in that it is one of only two methods we came across that demonstrated actual numerical results for the optimization of stochastic projects with more than 50 activities. It is the sole method we found in the literature that reported computing times to achieve solutions as a measure of practical efficiency. For these reasons we chose to use the EMA results as a benchmark for the performance of our proposed method. We compare our results with respect to both numerical accuracy and computational speed to the results of Tereso, Araújo and Elmaghraby [30] in Section II.E. Based on our research we decided that Sample Path Optimization (SPO) was the most promising choice for the solution of the stochastic resource allocation problem. For a comprehensive review of SPO see Gurkan, Ozge and Robinson [15]. Our interest in SPO was originally sparked by the insightful paper of Plambeck et al. [23] in which the method of SPO was applied to solve the stochastic RCPSP. In their paper, networks of up to 110 activities were solved; however no results were published indicating the computing time required to achieve the solutions. We suspect that the results in their paper would have served as a good benchmark (along with the EMA method mentioned above), but there are several material differences between our model and Plambeck et al.’s that make such comparison difficult. The first lies in the very structure of their objective function which is quite restrictive; the second lies in their restriction to either triangular or uniform distributions to represent the durations of the activities followed by a drastic restriction on the parameters that define these distributions. Further, the absence of any data on how long Plambeck et al.’s method actually took to get a solution of any of the networks cited prevents any direct comparison between the results of the two methods. Although we were unable to use the results of Plambeck et al. as a direct benchmark for our method, the paper was of significant interest to us because it motivated the seed that eventually grew into our solution procedure. Section I.A, II.A ann II.B introduce the notation used in the remainder of the paper. Section II.C defines the stochastic problem mathematically. Section II.D applies the concept of Sample Path Optimization to the single stage problem and details the experimentation accomplished with this new approach. Section II.E compares the SPO approach to the EMA approach; the paper terminates with the conclusions and directions for future research in Section III.
372
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 373
A. Project presentation and notation A given project will be represented as a directed acyclic graph (dag) G in ‘Activity-on-Arc’ (AoA) mode of representation in which each node corresponds to an ‘event’ – a point in time corresponding to an occurrence – and each arc corresponds to an activity. G is defined by a set of nodes N and a set of arcs A. The precedence relationships among the activities are given by an array I of two columns and |A| rows, in which a row corresponds to an activity, the entry in the first column identifies its start node and the entry in the second column identifies its end node. An activity may be referred to either by label (‘a’, ‘i’, ‘setup’, etc.) or by its start and terminal nodes written as an ordered pair such as (i,∞∞j). Henceforth we assume that the graph G is a ‘two point graph’ with one start node and one terminal node. The start node (source) of the entire project will always be designated as node 1 and the terminal node (sink) as node n, where n is the largest numbered node in the set N. A node is considered to be realized when all of the activities terminating in the node have completed processing. At the time of realization of a node, all activities emanating from it may begin immediately and are referred to as ‘sequence-feasible’ (sf) activities. By convention and without loss of generality, the realization time of node 1 is taken to be zero and the realization time of node n represents the makespan (total duration) of the project. A uniformly directed cutset (udc) is a cutset in the graph G in which Dall arrows lead from the subset U which contains node 1 into subset U = N − U which contains node n. Our analysis deals exclusively with one renewable resource type such as manpower, funds, space; etc. A brief discussion of multiple resources shall be given in the section on Conclusions. Example 1 (The IG with udc’s): N∞∞=∞∞1,2,3,4 A∞∞=∞∞{a,b,c,d,e} or {(1,2),(1,3),(2,3),(2,4),(3,4)}. The udc’s are: C1∞ =∞∞{a,b}; C2∞ =∞∞{b,c,d}; C3∞ =∞∞{d,e} ⎡1 ⎢ ⎢1 I = ⎢2 ⎢ ⎢2 ⎢3 ⎣
2⎤ ⎥ 3⎥ 3⎥ ⎥ 4⎥ 4 ⎥⎦ 373
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 374
FIGURE 1 Example Project: The Inderdictive Graph (IG)
II. THE SINGLE STAGE PROBLEM A. Definition and discussion We shall start modestly and assume that concern will be to propose a control strategy (CS) that can determine the optimal static policy to be followed for the whole project. The assumption is that at the start of the project the CS calculates the optimal resource allocation vector x*∞∞∈∞∞X∞∞⊂∞∞R|A| that results in the minimum expected project cost K* which is the optimal static policy to be carried out throughout the duration of the project. It is ‘static’ in the sense that no future re-allocation of the resource is permitted, hence the identification as ‘single stage’.
374
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 375
B. Work content, activity duration ans resource cost In addition to the graph G, we need to define the following vectors, all of which are indexed on the set A: f: r: R: s: W: x: X: y: a: b:
completion (finish) time. resource cost per unit of the resource. total availability of the resource. start time. work content (a random, possibly correlated, vector), for which w is a particular random sample of W. resource allocations (the decision variables). space of all possible resource allocations. activity duration. lower bounds on x. upper bounds on x; b∞∞≥∞∞a.
Other parameters of the project are: total project cost, K∞∞=∞∞KR∞ +∞∞KT. portion of project cost due to tardiness. portion of project cost due to resource usage. sample mean project cost derived from a sample of size h. due date of the project. sample path matrix where each row is an independent sample of W. g: cost of project tardiness per unit time. time of realization of node i. ti: EW: expectation over the sample space of the random vector W. K: KT: KR: K h: TS: [W]:
In our context ‘work content’ is a measure of the total effort required to complete the activity, measured in the most convenient unit for the activities such as man-days or machine-hours. From the previous discussion we know that there exists a functional relationship between the work-content W(i,∞∞j), the duration y(i,∞∞j), and the resource allocation x(i,j) for each activity (i,∞∞j)∞∞∈∞∞A. In addition we know that as the resource allocation is increased (within certain bounds), the duration of the activity decreases. Therefore we may
375
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 376
take the following as a general model for this relationship (dropping W the subscripts), Y = a in which the exponent a is typically in x the interval [0,5;1] In some sense, a measures the efficiency of the utilization of additional resources. Note that all three variables are vectors of dimension |A|. We define a ‘mode of execution’ as the ordered pair (x,∞∞y). Since W is a random variable (r.v.), so is Y, which distribution is secured from the distribution of W via the (deterministic) constant xa; FY ( y ) =
1 xa
∫0 d (W ). y
We assume that a manager can determine a priori for each activity (i,∞∞j)∞∞∈∞∞A an interval {| a(i,∞∞j),∞∞b(i,∞∞j)}| of the values that x(i,∞∞j) can assume. We claim that somewhere in this interval there exists an allocation x(0i, j ) that will be referred to as the ‘neutral’ resource allocation for activity (i,∞∞j). We define ‘neutral’ as the situation where there is neither pressure to ‘crash’ the activity by allocating maximum resource (x(i,∞∞j)∞ =∞∞b(i,∞∞j)) nor lag in the execution of the activity by applying minimal resource (x(i,∞∞j)∞ =∞∞a(i,∞∞j)); instead we are faced with the neutral situation in which the allocation results in the ‘normal’ pace of the activity. We assume that the manager can provide the neutral mode (x0,∞∞y0) corresponding to an allocation x0. Thus the work content w(0⋅) may be expressed in terms of the neutral mode by w(0⋅) = y(0⋅) x(0⋅) , assumed fixed for the duration of the activity. Henceforth we shall drop the superscript ‘0’ and refer to the ‘activity work content’ w(.) which is ≡ w(0⋅) . Then for any allocation x(i,∞∞j) we have y( i, j ) =
w( i, j ) , w( i, j ) = w(0i, j ) . a x( i , j )
Next we turn our attention to the resource cost cR given on a per time unit of duration basis. We model the resource cost cR as an increasing function of the resource allocation x: cR∞ =∞∞rxb;∞∞b∞∞>∞∞0,
376
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 377
in which r is a constant. This cost is incurred per unit time; then for the duration of the activity we have that the total resource cost C(i,∞∞j),R incurred to complete a particular activity is given by the following (dropping the activity designation): CR∞ =∞∞cRy∞∞=∞∞rxby∞∞=∞∞rwxb∞∞–∞∞a. The SAN model that is presented in Section II.C uses a∞∞=∞∞1 reflecting a hyperbolic relationship between duration and allocation (w∞∞=∞ xy), and b∞∞=∞∞2 (reflecting a quadratic relationship between cost and allocation, cR∞ =∞∞rx2). In general we require that b∞∞>∞∞a, because we desire CR to be an increasing function of the allocation x. C. The stochastic activity network model (SAN) We shall refer to our version of the stochastic RCPSP as the ‘stochastic activity network (SAN)’ problem. Our ultimate goal is to solve the stochastic optimization problem given by ((1)) below. The main difference between the SAN problem and other deterministic activity network problems (see reference [20]) resides in the recognition that the work content of activity (i,∞∞j) is a r.v., denoted by W(i,∞∞j) The formal statement of the SAN problem is as follows. ⎤ ⎡ ⎥ ⎢ v * = min Ew C ( x,W ) = min Ew ⎢ ∑ r( i, j ) w( i, j ) x( i, j ) + g ⋅ max 0, tn ( x,W ) − Ts ⎥, (1) x x ⎢( i, j )∈A 1444 424444 3⎥ 42444 3 tardiness cost ⎥ ⎢ 144 resource cost ⎦ ⎣
[
]
(
)
such that for each possible realization of the project (at which time the r.v.’s {W(i,∞∞j)} are no longer r.v.’s but are known deterministically and so are the {tj}‘s under the allocation x) a(i,∞∞j)∞ ≤∞∞x(i,∞∞j)∞ ≤∞∞b(i,∞∞j),
∀∞(i,∞∞j)
(2)
ti∞ –∞∞tj∞ +∞∞wi,∞∞j xi,∞–1∞j ∞ ≤∞∞0,
∀∞(i,∞∞j)∞∞∈∞∞A
(3)
u∞∞≥∞∞tn∞ –∞∞Ts;
∑ x j ≤ R, { j}∈C
(4) ∀∞Cq
(5)
q
all variables are non-negative
(6)
377
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 378
in which W is the random work content vector, tn is the project makespan (a function of W hence a r.v.), Cq is the time of realization of node i, u measures the tardiness of the project, and Cq denotes the qth udc. The notation {j}∞∞∈∞ Cq means that the sum is over all the activities in the udc. Stated in words, we wish to minimize the expected value of the cost function C∞(x,∞W) subject to the bounding constraints on the resource allocation x and the aggregate resource constraint placed on the concurrent activities that are active in udc Cq for all udc’s. The random nature of the cost function C∞(x,∞W) is a consequence of its dependence on the randomly distributed work content of the activities W. In addition, the project makespan tn is itself also a r.v. that depends on both the allocation x and the random work content W. The expression for the tardiness cost, CT∞ =∞∞g∞⋅∞max∞(0,∞tn∞(x,∞W)∞∞–∞∞Ts) clearly indicates that the tardiness cost is also a r.v. It is this temporal tardiness cost term, combined with the requirements of (3) and (4) for all possible realizations of the project that complicate the analysis, making the SAN optimization problem difficult to resolve. The reason for this difficulty is that while the expectation of a sum is equal to the sum of the expectations, so the resource cost term is quite easy to evaluate, in general it is not true that the expectation of a maximum is equal to the maximum of the expectations, so the tardiness cost term is problematic to evaluate. Additionally, constraints (4)-(5) give rise to an infinite number of constraints in case of continuous distributions of the W’s. We approach the solution to this problem via the method of Sample Path Optimization (SPO); see Gurkan, Ozge, and Robinson [15]. D. Application of sample path optimization to the stochastic avtivity network problem The sample mean project cost C H ( x ) for a given allocation x and sample size H may be expressed as follows: C H ( x, w1, w2 ,…, w H ) =
378
1 H
∑ C ( x, wh ), H
h =1
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 379
where the {Wh }h =1 vectors represent a series of H independently and H
identically distributed samples of the random work content vector W. From the strong law of large numbers we have that 1 H →∞ H lim
∑ C ( x, wh ) = Ew [C ( x,W )]. H
h =1
This result implies that we may use SPO to approximate the optimal solution to the SAN problem presented in Section II.C. The quality of the approximation improves as the sample size H increases. An interesting question which shall be dealt with presently is how small can H be and still achieve ‘close enough to the optimum’ results? When the number of samples (project realizations) is fixed at H, we refer to the set of H project realizations as a ‘sample-path of length H’. To make our notation more compact we shall compose a sample path matrix [W] using the vectors w1,∞∞w2∞, …, wH row-wise. Since each project realization wh is a sample of the vector W, w will have |A| elements. Therefore our sample path is a matrix [W] comprised of H rows and |A| columns where each row represents an independent sample of W; and {Wh } as the element of the sample path matrix contained at the ( i, j ) ( h)
h th row and activity (i,∞j) column. In order to use SPO for the solution of the SAN problem, we must
( [ ])
first construct a deterministic function Cn x, W , that utilizes the sample path information (now the constant matrix [W]) and has as its domain the feasible decision space of resource allocations
( [ ]) will almost
X∞∞⊂∞∞R|A|∞ ∩∞∞(bounds) Furthermore, the function C n x, W
surely converge point-wise to EW[C∞(x,∞W)] as n∞∞→∞∞∞. In reference [20] we presented the deterministic activity network (DAN) model for minimizing the project cost of an activity network when the work content of all the activities is known with certainty. In effect the DAN model locates the minimizing allocation x* that produces the minimum cost C* for a particular realization w of the project. Our goal in using SPO is to find a minimizer that produces the minimum cost on average when that allocation is implemented to all possible realizations of the project. In order to accomplish this objective, we extend the DAN model through the addition of new variables and constraints. This ‘extended’
379
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 380
model will be referred to as the ‘extended deterministic activity network’ or E-DAN for short. We desire the optimizer that produces the minimal average cost over a sample of size H, and denote it by x. We maintain that x is an approximation to x*, and that the approximation improves as x* increases so that in the limit x∞∞→∞∞x*. Since every sample can (and usually will) be different, the activity durations which depend on the work content will also vary for different realizations. In turn, the node realization times {ti:∞∞i∞∞∈∞∞N} and tardiness max{0, tn∞ –∞∞Ts} will also differ. Therefore a separate set of temporal and tardiness variables corresponding to node realization times and tardiness is needed for each of the H samples contained in [W]. Denote the node realization time of node i∞∞∈∞∞N derived using an allocation x and the h∞th row (h∞∞=∞∞1,2,…,H) of the sample path matrix [W] by ti( h) . In addition denote the tardiness incurred in realization h as
{
}
u ( h) = max 0, tn( h) − Ts . We now have the necessary information to write our objective explicitly:
( [ ])
min C x, W = x ∈X
1 H
⎡r ( h ) W ( h ) x + gu ( h ) ⎤, ⎢ ( i, j ) ⎥⎦ ( i, j ) ( i, j ) h =1 ( i, j )∈A ⎣ H
∑ ∑
[ ]
(7)
in which the space of feasible decision vector x is specified by the constraints on the individual activity allocations. Next we must add the constraints; they are, ( h) h h ti( ) − t (j ) + W i, j x(−i1, j ) ≤ 0 ( )
(8)
h h u ( ) ≥ tn( ) − Ts
(9)
[ ]
a(i,∞j)∞ ≤∞∞x(i,∞j)∞ ≤∞∞b(i,∞j)
(10)
∑ xa ≤ R, ∀q {a}∈C
(11)
∀∞(i,∞∞j)∞∞∈∞∞A,
(12)
1
h∞∞=∞∞1,2,…,∞H,
{ }
and all variables (including u ( h ) ) are non-negative.
380
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 381
We denote by x(i,∞j) the optimal resource allocation to activity (i,∞∞j) derived from the above model, resulting in the expected cost C(x,∞[W]) The constraints for the E-DAN model can be divided into four categories: temporal to ensure that the precedence structure defined by the graph G is respected in each realization, tardiness that replace the r function max 0, t ( ) − T used to model the tardiness as a non-
{
n
s
}
negative linear function, ‘box-type’constraints composed of |A| upper and |A| lower bound on x (only a single set of which will be applied to all realizations identically), and the aggregate resource constraints. We deviate from the aggregate resource constraints of in one important respect: we shall impose an aggregate resource constraint only on the starting udc C1; whence shall read as:
∑ xa ≤ R. {a}∈C 1
There are two reasons for this action: 1. at the start of the project, or for that matter at any stage during the project execution, we do not know which udc shall be the ‘controlling’ one in the residual project at any future stage, or which activities shall be ‘active’ and concurrent in it. Imposing a blanket set of constraints on resource usage by all the activities in all possible udc’s shall over-constrain the allocations leading to inordinately inflated cost which is far from the optimum. This is over and above the fact that enumerating the udc’s is an onerous task in itself because of their large number, rendering the solution of the resultant NLP virtually impossible to achieve. 2. optimization under the resource constraint on udc C1 shall result in a lower bound on the expected cost of the project because we are relaxing future constraints on resource usage. This information is valuable in itself. Further, the dynamic simulation of the progress of the project, as described in Section II.E below enables one to emulate the behavior of the project manager in a more meaningful way than the static approaches advocated in the literature. Like the DAN model, the E-DAN model will be formulated and solved as a geometric program (GP). For the sake of completeness, the rationale behind this choice and the procedure for converting the model to a GP standard form are given in [20].
381
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 382
The question now becomes just how large does H have to be until closeness to the exact value is reached. The answer is of course problem specific, but our experiments indicate that H∞∞≈∞ 500 is sufficient for achieving excellent approximation [21]. E. Comparison of Sample Path Optimization (SPO) and the Electromagnetism Algorithm (EMA) In this section we compare our results using SPO for the testbed projects to the results reported using EMA on the same projects. Table 1 gives the salient characteristics of the testbed graphs; the spreadsheet containing the details specifications of the fourteen projects can be found in URL: http://www.ise.ncsu.edu/elmaghraby/index.html. In this section we focus on the (largest) project of 76 activities labeled ‘Graph 14’ in Table 1. This project was originally studied by Tereso, Araújo and Elmaghraby [30] in their paper using EMA. Examination of Graph 14 reveals that the results obtained using our SPO procedure differ significantly from those obtained through the use of EMA for the same project (see the summary data at the very bottom of the sheet). In particular the optimal expected cost for EMA is reported as 475.14, compared to 581.52 for SPO. We also observe
{ }
a difference in the optimal resource allocations x(*i, j ) where the optimal allocations for EMA are almost always smaller than the corresponding optimal allocations for SPO. Since the optimal expected cost for EMA is smaller and the optimal solutions differ considerably, we certainly can not claim that both SPO and EMA are equivalent optimizing approaches, and further validation of the results are required. The main focus of our concern in validating our result is related to the accuracy of a given solution (i.e. a vector of resource allocations) and the given value to the ‘true’ optimal allocation and value. Our optimal solution refers to the vector of resource allocations x secured via SPO that produces the minimum expected cost C. Although it is very difficult to demonstrate through numerical experimentation that x is the optimizer (or very close to it), it is relatively easy to check via MCS whether or not the adoption of the static policy x actually results in a mean cost that is equal, or very close, to the global optimum C*. The application of MCS to carry out this check is simple: we fix the allocation at x at the value secured by SPO, then take a sample path of project realizations [W] of very long
382
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 383
length (H∞∞≥∞∞50,000) and simply evaluate the sample mean cost C using x and [W] Call the resulting evaluation CMCS. Thus we have
( [ ]) where the function C is defined as in Section II.D. If
C MCS = C x˜, W
there is a significant difference between C MCS and the reported optimal expected cost C then it becomes very difficult to claim optimality in value without being able to claim accuracy in allocation that would realize that value. In other words, how can an optimization procedure possibly iterate to the optimal allocation if it is not able to evaluate the quality of each candidate solution along the way accurately? The results of the double check via MCS are as follows. The EMA method applied to the project of 76 activities reports an optimal cost of 475.14; however when the optimal solution from EMA is subjected to a MCS of size n∞∞=∞∞50,000, a cost of 644.42 is obtained indicating that EMA under-estimates the correct expected cost for this solution ⎛ 644.42 − 475.14 ⎞ by approximately 26%⎜ ≈ × 100⎟ . When identical ⎝ ⎠ 644.42 analysis is applied to the SPO optimal allocation vector xˆ, the MCS produces a cost of 578.00 which differs from the reported cost of ⎛ 581.52 − 578.00 ⎞ 581.52 by only 0.6%⎜ = × 100⎟ . So it seems that, in ⎝ ⎠ 578.00 this particular case, SPO is more accurate than EMA. Of course the accuracy of EMA can be bolstered by using larger samples to evaluate each ‘particle’ (at the cost of more computing time). So to make an objective comparison between SPO and EMA, the computing times must also be accounted for in the comparison. The results reported above for SPO were achieved in approximately 1.85 minutes of computing time (column labeled ‘RT’ – for ‘run time’ – in Tables 1 and 2), as compared to 532.80 minutes (≈∞∞8.9 hours) for the EMA results. The processing power of the computers used to solve the respective problems are roughly the same; but we cannot judge the efficiency of the computer implementation in the case of EMA, which may play a dominant role. Still, the difference is so great that it seems reasonable to conclude that SPO is more efficient (time-wise) than EMA while also being more accurate (value-wise). To reinforce this conclusion we carried out the same analysis on all 14 graphs tested by Tereso, Araújo and Elmaghraby [30]. The results appear in Table 2 below. Note that for the SPO experiments summarized in Table 2 we required
383
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 384
cvK∞ ≤∞ 0.03 for all projects tested (see Section II.D for explanation). The due dates {Ts} and tardiness costs {g} for each graph are given in Table 1. TABLE 1 Testbed problems and the SPO results Project
|A|
Ts
g
C*
RT (sec)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
3 5 7 9 11 11 12 14 14 17 18 24 38 76
16 120 66 105 28 65 47 37 188 49 110 223 151 121
2 8 5 4 8 5 4 3 6 7 10 12 5 4
26.82 151.51 111.98 219.34 55.77 159.26 102.11 66.53 374.40 76.42 205.60 830.28 594.94 347.96
0.34 0.30 0.22 0.30 0.33 0.36 0.28 0.31 0.38 0.45 0.64 0.30 0.53 0.48
TABLE 2 Comparison between EMA and SPO EMA G
|A|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
3 5 7 9 11 11 12 14 14 17 18 24 38 76
384
C*
MCS
SPO % Diff
39.58 47.50 –∞0.17 330.97 533.97 –∞0.38 168.02 313.40 –∞0.46 320.16 529.13 –∞0.40 118.78 199.01 –∞0.40 238.84 580.40 –∞0.59 132.12 221.39 –∞0.40 91.80 138.18 –∞0.34 609.55 1028.90 –∞0.41 105.88 225.57 –∞0.53 333.63 689.72 –∞0.52 857.70 1666.00 –∞0.49 693.07 1029.10 –∞0.33 475.14 644.42 –∞0.26
RT sec
C*
2.05 45.25 3.88 348.78 6.18 231.88 8.87 454.53 11.67 125.54 11.94 334.85 13.99 186.88 17.12 125.72 17.90 752.59 24.56 147.47 28.55 408.36 47.19 1361.10 118.80 939.42 532.80 581.52
MCS
% Diff RT sec
44.60 0.01 344.81 0.01 226.96 0.02 431.07 0.05 123.18 0.02 358.00 –∞0.07 187.88 –∞0.01 122.12 0.03 755.64 –∞0.004 147.95 –∞0.003 419.96 –∞0.03 1356.50 0.003 935.54 0.004 578.00 0.01
0.03 0.05 0.09 0.11 0.17 0.14 0.15 0.18 0.17 0.27 0.27 0.34 0.61 1.85
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 385
Why is there such a wide discrepancy between the EMA approach (which converges to the optimum with probability 1, as demonstrated by Birbil, Fang and Sheu) and the SPO approach? The answer lies in the very nature of the two approaches and the underlying assumptions of each model. The model of Tereso, Araújo and Elmaghraby [30] deals with a population of static allocations in which each ‘particle’ represents a vector x of allocations that is fixed for the duration of the project and the expected value (secured via MCS) of the cost of the project under such allocation. On the other hand, the SPO model determines the vector of allocation vector x that minimizes the cost over the ensemble of the H realizations. j Thus while it is true that the vectors x ( ) in the EMA approach
{ }
and the optimal vector x in the SPO approach are all static allocations that do not vary adaptively over the life of the project; and that both approaches ignore the aggregate capacity constraints (except for the initial udc in the case of the SPO approach), the two approaches differ in their treatment of the problem. Little wonder that the results differ, and radically so.
III. CONCLUSIONS AND AREAS FOR FUTURE RESEARCH Our goal in this paper was to propose a method that efficiently solves the stochastic resource allocation problem in activity networks. From the research we have conducted, it appears that the ‘marriage’ between geometric programming (GP) and sample path optimization (SPO) accomplishes this goal quite well. This section summarizes the contributions made by our analysis and also points out some areas of future research The ‘single stage’ or ‘static’ problem has been solved to a high degree of accuracy (relative to value) and in a very efficient manner using GP. To our knowledge there is no published work where GP has been applied to the optimization of activity networks. Furthermore a method – Sample Path Optimization (SPO) – has been utilized that possesses theoretical convergence properties indicating that as the size n of the sample path [W] increases the optimal solution to the extended deterministic activity networks (E-DAN) program (Section II.D) approaches the optimal solution to the stochastic activity networks of concern to us. The SPO method (implemented through the E-DAN)
385
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 386
has been formulated as a GP to bolster computational efficiency and ensure unambiguous global optimality. Another significant contribution is the ability of the proposed method to efficiently optimize stochastic networks of hundreds (and possibly even thousands) activities. As mentioned previously in the review of literature (Section I), the largest successfully solved project that we encountered in our research of the stochastic RCPSP was the 110 activity graph solved in Plambeck et. al. [23] (under quite constraining assumptions). In the course of our experiments, we have successfully optimized graphs with up to 1000 activities. The results obtained from SPO experiments on stochastic graphs of 250, 500, and 1000 activities respectively can be obtained from the second author by request (in spreadsheet format). The model we propose has some nice properties in that it is flexible and can be implemented in a modular fashion. Specifically the cost function (Section II.B) may take many forms as long as it remains posynomial so that GP may be applied. In our experience, posynomial cost functions are able to model almost all realistic functional relationships in the domain of activity networks, so the posynomial restriction is not really restrictive. In addition, the input random variables (the work content vector W) in our model may be of any distribution specified by the user. As long as the specification of W allows for random sampling via Monte Carlo sampling (MCS), it is permissible. Therefore W is free to be continuous, discrete, mixed, empirical, and even correlated, provided that we know how to randomly sample it and can easily determine the probability distribution of any ‘residual work content’. (Our assumption of exponentially distributed work content rendered this latter caveat unnecessary, thanks to the ‘memory-less’ property of the exponential distribution.) The problem of calculating residual work content becomes an issue only in the multi-stage case, therefore the single stage problem described here is unfettered by this concern. In order for this flexibility in the form of W to be possible, we have intentionally separated the parameters of the input distributions from the objective function. In other words the decision variables (the allocation vector x) in the cost function are unrelated to the parameters of W (such as the. mean, variance, etc.). Another important feature of our model is the output data it produces. In addition to producing the optimal allocation xˆ as an estimate of the ‘true’ optimum x* and the associated minimum average cost C as an estimate of the ‘true’ optimum C*, the optimal structural
386
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 387
variables for the E-DAN program also provide sample estimates for the
{ }
optimal realization times of all the nodes of the project ti(k ) for nodes
{ }
(k ) i∞∞∈∞∞{2,3,…,|N|}; the optimal tardiness un , and the cost of the pro-
{ }
(k ) ject C . Using this data, output analysis can be carried out to esti-
mate the distributions of the makespan tn as well as every node realization time ti∞:∞i∞∞∈∞∞{2,3,…,|N|∞∞–1} under the static policy xˆ. The complicated random expression for tardiness CT∞ =∞ g∞max∞(0,∞(x,∞W)∞∞–∞ Ts) may be analyzed using the output data supplied by the E-DAN. Therefore it is possible to investigate the relative importance of the tardiness cost versus resource cost for a particular project. There are several areas where the model could be enriched in the course of future research. One major area of concern is the objective function. In this research we have chosen a cost function consisting of a resource cost component and a tardiness cost component. As mentioned previously, the resource cost portion may be taken as any posynomial function of the allocation x. The investigation of other (perhaps more realistic) posynomial resource cost functions is an important area for future empirical research. We have defined tardiness in terms of the makespan of the project; but in general it is possible to use any tardiness cost function desired, provided that the function is posynomial in the allocation x and the node realization times ti. For example if a project naturally subdivides itself into phases, it may be desirable to place financial incentives (in the form of penalties and/or bonuses) which occur at certain milestone events designating the completion of a particular phase. Actually the model presented in this paper with just a single stage and a single milestone event (project completion) is a special case of this more general situation. In any case there is definite opportunity to enrich the model by investigating ways to improve the temporal aspects. Finally, an area that requires further investigation is the degree of optimality of the realized solution. In this paper we rested on an argument derived from the strong law of large numbers to claim closeness to optimality. It would be desirable to have independent verification for this claim in the form of a sufficient condition that could be applied to a particular solution x to show its degree of optimality; that is, its closeness to the optimum. Therefore a future area of research
387
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 388
would be to derive such a condition for our SAN problem and apply it experimentally. REFERENCES [1] Azeron, A., Perkgoz, C., and Sagawa, M., (2005) “A Genetic Algorithm Approach for the Time-cost Trade-off in PERT Networks”, Applied Mathematics and Computation 168, 1317-1339. [2] Birbil, S.I. and Fang, S-C. (2003) “An Electromagnetism-Like Mechanism for Global Optimization,” Journal of Global Optimization 25, 263–282. [3] Birbil, S.I., Fang, S.-C. and Sheu, R.-S. (2004) “On the Convergence of the Electromagnetism Method for Global Optimization,” Journal of Global Optimization 30, 301-318. [4] Chu, W-M., and Yao, M-J. (2003) “A simulation-based genetic algorithm for the optimal resource allocation in probability activity networks,” Proceedings of the MIC2003 Fifth Conference, Kyoto, Japan, Aug 25-28. [5] Chu, W-M., Yao, M-J., and Tseng, T-Y., (2004) “An Improved Genetic Algorithm for Solving the Optimal Resource Allocation Problem in Stochastic Activity Networks,” Proceedings of the Fifth Asia Pacific Industrial Engineering and Management Systems Conference. [6] Demeulemeester, E.L. and Herroelen, W.S. (2002) Project Scheduling: A Research Handbook, Kluwer, New York, NY. [7] Duffin, R. (1967) Geometric Programming, John Wiley and Sons Inc., New York, NY. [8] Elmaghraby, S.E. (1968) Activity Networks: Project Planning and Control by Network Models, Wiley Interscience, New York, NY. [9] Elmaghraby, S.E. and Kamburowski, J. (1992) “The Analysis of Activity Networks Under Generalized Precedence Relations,” Management Sci. 38, 1245-1263. [10] Elmaghraby, S.E. and Ramachandra, G. (2007) “Optimal resource allocation in activity networks. II: The stochastic case,” submitted for publication. [11] Fu, M.C. (2006) “Sensitivity analysis in Monte Carlo Simulation of stochastic activity networks,”Robert H. Smith School of Business, Department of Decision and Information Technologies, University of Maryland, College Park, MD 20742. To appear in the Festschrift honoring Saul Gass for his 80th birthday. An earlier version appeared in the Proceeding of the International Conference on Automatic Control and System Engineering (2005). [12] Fu, M.C. (2005) “Gradient Estimation,” Chapter 19 in Handbooks in Operations Research and Management Science: Simulation, S.G. Henderson and B.L.Nelson, eds., Elsevier. [13] Gen, M. and Cheng, R. (1997) Genetic Algorithms and Engineering Design, John Wiley and Sons Inc., New York, NY. [14] Groër, C. and Ryals, K. (2006) “Sensitivity analysis in simulation of stochastic activity networks: A computational study of different methods for estimating derivatives for stochastic activity networks,” Robert H. Smith School of Business, Department of Decision and Information Technologies, University of Maryland, College Park, MD 20742. [15] Gurkan, G., Ozge, A.Y., and Robinson, S. (1994) “Sample-path optimization in simulation”, Proceedings of the 1994 Winter Simulation Conference. [16] Gutjahr, W.J., Straus, C. and Wagner, E. (2000) “A stochastic Branch-and-Bound approach to activity crashing in project management,” INFORMS Journal on Computing 12, 125-135. [17] Herroelen, W.S. and Leus, R. (2004) “Robust and reactive project scheduling: a review and classification of procedures”, International Journal of Production Research 42, 1599-1620.
388
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 389
[18] Herroelen W.S. and Leus, R. (2004) “The construction of stable project baseline schedules”, European Journal of Operational Research 156, 550-565. [19] Leus, R. and Herroelen, W.S. (2004) “Stability and resource allocation in project planning”, IIE Transactions 36, 667-682. [20] Morgan, C.D. and Elmaghraby, S.E. (2007) “Resource Allocation in Activity Networks: A Geometric Programming Model”, accepted for publication in Journal of Operations and Logistics. [21] Morgan, C.D. (2006) “A Sample Path Optimization Approach for Optimal Resource Allocation in Stochastic Projects,” Master of Science Thesis, North Carolina State University, Raleigh, NC. [22] Neumann, K., Schwindt, C. and Zimmermann, J. (2001) Project Scheduling with Time Windows and Scarce Resources, Lecture Notes in Economics and Mathematical Systems #508, Springer, N.Y. [23] Plambeck, E., Fu, B-R., Robinson, S. and Suri, R. (1996) “Sample-path optimization of convex stochastic performance functions,” Mathematical Programming 75, 137176. [24] Ramachandra, G. and Elmaghraby, S.E. (2007) “Optimal resource allocation in activity network: I. The deterministic case”, submitted for publication. [25] Norkin, V.I., Pflug, G.CH. and Ruszcynski, A. (1998) “A Branch and Bound method for stochastic global optimization,” Mathematical Programming 83, 425–450. [26] Robbins, H. and Monro, S. (1951) “A Stochastic Approximation Method,” Ann. Math. Stat. 22, 400-407. [27] Stork, F. (2001) Stochastic Resource-Constrained Project Scheduling, PhD thesis, Technical University of Berlin, School of Mathematics and Natural Sciences. [28] Tereso, A.P., Araújo, M.M.T. and Elmaghraby S.E. (2004), “Adaptive Resource Allocation in Multimodal Activity Networks”, IJPE 92, 1-10. [29] Tereso, A.P., Araújo, M.M.T. and Elmaghraby S.E. (2003), “Experimental Results of an Adaptive Resource Allocation Technique to Stochastic Multimodal Projects,”paper presented at the International Conference on Industrial Engineering and Production Management (IEPM03), Porto, Portugal, May 26-28, 2003, and appearing in the Conference Proceedings. [30] Tereso, A.P., Araújo, M.M.T. and Elmaghraby S.E. (2004), “The Optimal Resource Allocation in Stochastic Activity Networks via The Electromagnetism Approach,” paper presented at the Ninth International Workshop on Project Management and Scheduling (PMS’04), Nancy, France, 26-28 of April, 2004, and appearing in the Conference Proceedings. [31] Wolfowitz, J. (1952) “On the stochastic approximation method of Robbins and Monro,” Ann. Math. Stat. 23, 457-461.
389
0332-07_TEM_07-3_04_Elma-Morgan
12-10-2007
09:03
Pagina 390