Yugoslav Journal o Operaons Research Volume 19 (2009) Number 2, 281-298 DOI:10.2298/YUJOR0902281S HEURISTIC ALGORITHM FOR SINGLE RESOURCE CONSTRAINED PROJECT SCHEDULING PROBLEM BASED ON THE DYNAMIC PROGRAMMING Ivan STANIMIROVIĆ 1, Marko PETKOVIĆ 2 Predrag STANIMIROVIĆ 3 * and Mroslav ĆIRIĆ 4 1,2,3,4 Unversy o Nš, Deparmen o Mahemacs and normacs, Faculy o Scences and Mahemacs, 1 van.sanmrovc@gmal.com, 2 dexerons@neobee.ne, 3 pecko@pm.pm.n.ac.rs, 4 crcm@bankerner.ne Receved: May 2006 / Acceped: Ocober 2009 Absrac: We nroduce a heursc mehod or he sngle resource consraned projec schedulng problem, based on he dynamc programmng soluon o he knapsack problem. Ths mehod schedules projecs wh one ype o resources, n he non-preempve case: once sared an acvy s no nerruped and runs o compleon. We compare he mplemenaon o hs mehod wh well-known heursc schedulng mehod, called Mnmum Slack Frs (known also as Gray-Kdd algorhm), as well as wh Mcroso Projec. Keywords: Resource schedulng, dynamc programmng, knapsack problem, DELPHI. 1. INTRODUCTION In pracce mos organzaons work whn lmed resources, so projecs are subjec o he same consran. A new projec may seek an addonal use o resources, so s needed o ensure ha hey really would be avalable. * Correspondng auhor
282 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm On he oher hand, he me consrans are always presen, so projec manager mus work under ha boundary. Resource levelng s a way o resolve havng oo much work assgned o resources, known as resource over allocaon. The nework dagram can be used o nd opporunes or shorenng he projec schedule. Ths nvolves lookng a where we can cu he amoun o me akes o complee acves on he crcal pah, or example, by ncreasng he resources avalable o hese acves. Anoher soluon s o deny where any oher roues mgh have some slack. We may hen be able o reallocae resources o reduce he pressure on he eam members who are responsble or acves on he crcal pah. We consder he problem o resource dsrbuon a he pon o mnmzaon o he projec makespan, and nroduce a heursc mehod or solvng he sngle resource consraned projec schedulng problem, based on he knapsack problem and dynamc programmng. The oal number o avalable resource uns s consan and speced n advance. A un o resource canno be shared by wo or more acves. An acvy s ready o be processed only when all s predecessor acves are compleed and he number o resource uns requred by are ree and can be allocaed o. Once sared, an acvy s no nerruped and runs o compleon. When levelng resources, we do no change resource assgnmens, nor ask normaon. We only delay asks. In a dynamc programmng soluon o he knapsack problem, we calculae he bes combnaon or all knapsack szes up o M [12]: or j:=1 o N do or :=1 o M do -sze[j]>=o hen cos[]<(cos[-sze[j]]+val[j]) hen begn cos[]:=cos[-sze[j]]+val[j]; bes[]:=j end; In hs program, N s he number o ems, val[j] s he value o jh em, sze[j] s s volume, cos[] s he hghes value ha can be acheved wh a knapsack o capacy and bes[] s he las em ha was added o acheve ha maxmum (hs s used o recover he conens o he knapsack). Frs, we calculae he bes ha we can do or all knapsack szes when only ems o ype A (or j = 1) are aken, hen we calculae he bes ha we can do when only A s and B s (or j = 2) are aken, ec. The soluon reduces o a smple calculaon or cos[]. Suppose an em j s chosen or he knapsack: hen he bes value ha could be acheved or he oal would be val[j] + cos[ - sze[j]], where cos[ - sze[j]] s he opmal llng o he res o he knapsack. I hs value exceeds he bes value ha can be acheved whou an em j, hen we updae cos[] and bes[]; oherwse we leave hem alone. A smple nducon proo shows ha hs sraegy solves he problem [12].
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 283 In hs paper we propose a new sraegy o solve he sngle resource consraned projec schedulng problem. In each sage o he schedulng we consder a schedule me and he correspondng elgble se o acves whch could be sared a he momen whou volaon o gven consrans whch dene he projec. As s proposed n [14] and [9], we acvae a subse o acves rom he elgble se solvng he knapsack problem maxmzng he resource ulzaon. Bu, nsead o Greedy randomzed adapve search procedure (GRASP), used n [9], we apply he dynamc programmng and Bellman s prncple (see [1]). The paper s organzed as ollows. In he second secon we sae mahemacal ormulaon o he problem and compare he projec duraon compued by our algorhm wh he early nsh o he projec. In he hrd secon he algorhm and several mplemenaon deals are descrbed. In he las secon we compare he mplemenaon o our algorhm wh known soware Mcroso Projec 2003 and Gray-Kdd algorhm. 2. MATHEMATICAL FORMULATION OF THE PROBLEM A projec consss o a se o acves J = {A } I, parally ordered by precedence consrans, where I = {1,,n} s a se o acves ndces and n s a number o acves requred by he projec. I s assumed ha he projec requres only one ype o resources. The enre projec s dened as he ordered par (J, R), where he naural number R denoes he resource maxmal uns avalable n he projec. Each o acves A s dened as he ordered rple A = (p,, r, P ), I, where p N represens he processng me (duraon) o acvy A, value r N s a number o resources needed or A, and P I s an array whch conans predecessors ndces or A. An acvy A s sad o be a predecessor o A j, when A j canno sar unl A has nshed. Ths ac s wren as P j or A < A j, where < denes he precedence relaonshp. Smlarly A j s sad o be a successor acvy o A. We assume ha he number r s xed or he lasng me o acvy A. Le F denoes he se ncludng all pars o acves wh predecessor and successor relaonshps. These pars dene a dgraph o he projec G = (J, F), where (A, A j ) F and only P j, A, A j J. A projec sars a me = 0. A schedule or he projec s an assgnmen o a sar s me o each acvy A. An acvy s sad o be scheduled when s assgned a sar me. The vecor denng sars o acves ncluded no he projec (J, R) s dened as he s s s ordered n-uple = ( 1,..., n ) o naural numbers, and s called sar vecor o he projec. Smlarly denoe he vecor o acves nshes by = ( 1,..., n ). The nsh o each acvy
284 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm s s compued rom s sar as = + p. Vecors s and are beng calculaed n our algorhm. A easble schedule s a schedule ha sases he gven precedence and resource consrans. An opmum schedule s a easble schedule ha opmzes he gven objecve uncon. Our goal s o nd sar me s or each acvy A due o mnmze he projec compleon me (makespan) o he projec, calculaed by Dur : = max{ I}. We dene he resource uns requred by A n he schedulng me as ollows: s r, r = = xr, 0, oherwse where x = 1 when he acvy A s sared and sll no nshed (n he me nerval s ), and x 0 = oherwse. Formally, he am o he general sngle resource consraned projec schedulng problem s o nd an opmal schedule, and can be ormulaed by he ollowng mahemacal model, n he me : mn Dur = max{ I} (2.1) s s..( j I)( P ) (2.2) j j ( N ) r R (2.3) I Our objecve s o mnmze he makespan o he projec. Each acvy needs o be sared aer all s predecessors acves nsh (condon (2.2)), and n every momen, he oal number o occuped resources s less han R (condon (2.3)). Proposon 2.1. Condon (2.2) can be wren n he ollowng equvalen orm: ( j I)( P) p (2.4) j j j Observe ha he condon (2.4) s equvalen wh he correspondng one rom [15]. Thereore, mahemacal model (2.1)-(2.3) s equvalen wh correspondng one, descrbed n [9], [15], n he case when one ype o resources s used. Schedule s o he projec (J, R) s easble condons (2.2) and (2.3) are sased. A easble schedule s opmal (2.1) s ullled. Nex lemma can be easly proven by he nducon. Ths lemma gves a soppng creron or ncreasng maxmal un s avalably o he resource,.e. he early nsh o he projec. Lemma 2.1 Le s be he easble schedule o he projec (J, R). Le us consder he early nsh τ or each acvy A j, j I, recursvely as ollows: 0 j
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 285 Then p, P = 0; 0 τ j = 0 j j 0 max{ τ + pj}, oherwse. Pj 0 0 τ, or each I. Also Dur max τ = τ. Pj Proo. Le us apply he opologcal sor o G,.e. nd he permuaon 1,, n o I such ha P { 1,..., j 1} or all j I. Then we sor values τ 0 n he non-ascendng order j τ τ.we wll connue proo by he nducon. For j = 1, ollows ha P 1 =, so 0 0 1 n 0 s τ = p 1 p 1 + 1 =. In he case j > 1 suppose ha he clam o lemma s sased or all 1 1 1,, j-1 and prove or j. In he case P j = ;, concluson ollows rom he same reasons as 0 0 n he case j = 1. Suppose now ha P j =, and consder τ = p + max τ. From he nducve j j k k P j 0 hypohess we have τ k or every k k P j. Also, n vew o (2.2) we have = + p + p τ + p (2.5) s 0 k k j j j j j 0 or all k P j. I we ake he maxmum n (2.5) over all k P j, we oban τ, so we j j nshed he proo by nducon. The second saemen o he lemma ollows mmedaely. The resul o hs lemma s used as he soppng creron n he ollowng sense: n each example, he maxmal uns o he resource s ncreased unl all o hree consdered algorhms reach he duraon equal o early nsh o he projec. We resae, n he recursve orm, he noon o he lae sar o acvy A, known n he leraure: τ, n 1 = θ = 0 n 1 mn{ θ j p}, = 1,..., n 1. The lae nsh τ 1 o A s equal o τ 1 1 = θ + p and s early sar θ 0 s equal o 0 0 θ = τ p. 3. ALGORITHM Le us rs menon some known heursc resource schedulng mehods rom [4]. To choose a subse o acves sasyng projec consrans no he schedule, several heurscs are known. Mercs or assgnng prores are: 1) Shores Task Frs 2) Mos Resources Frs 3) Mnmum Slack Frs (Gray-Kdd algorhm)
286 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 4) Mos Crcal Followers 5) Mos Successors There are many papers comparng alernave heursc algorhms. Paerson and Davs n [6], [7] compared hese heurscs, n seral and parallel modes and acheved he resul he mos eecve algorhm s Mnmum Slack Frs. The smlar resuls are acheved n [10]. The Mnmum Slack Frs mehod s descrbed n [5] (p. 225 233). Kocheov and Solyar [9] devse an evoluonary algorhm whch com-bnes genec algorhm, pah relnkng, and abu search. In order o selec a subse o acves rom he elgble se no he schedule, hey solve he knapsack problem. The dea o usng he knapsack problem wh objecve uncon maxmzng he re-source ulzaon rao s nroduced n [13] and [14]. In order o solve he knapsack problem saed or he sake o resource ulzaon, n [9] and [14] use GRASP (greedy randomzed adapve search procedure) algorhm rom [8]. GRASP s an erave mul-sar algorhm. There are wo phases n every eraon: a greedy adapve randomzed consrucon phase and a local search phase. Sarng rom he easble soluon bul durng he greedy adapve randomzed consrucon phase, he local search explores s neghborhood unl a local opmum s ound. The bes soluon ound overall he deren eraons s kep as he resul [8]. A soluon x s sad o be n he basn o aracon o he global opmum local search sarng rom x leads o he global opmum. Once he neghborhood and objecve uncon are deermned, deren sarng soluons can be used o sar he local search n a mulsar procedure. I he sarng soluon s n he basn o aracon o he global opmum, local search nds he global opmum. Oherwse, a non-global local opmum s ound [11]. Usng greedy soluons as sarng pons or local search n a mul-sar procedure wll usually lead o good, hough, mos oen, subopmal soluons. Ths s because he amoun o varably n greedy soluons s small and s less lkely ha a greedy sarng soluon wll be n he basn o aracon o a global opmum. I here are no es n he greedy uncon values or, a deermnsc rule s used o break es, here s no varably and a mulsar procedure would produce he same soluon n each eraon [11]. In hs secon we wll nroduce an algorhm or resource schedulng, called DynamcRes, whch s based on he knapsack problem and he dynamc programmng. Ths heursc gves beer resuls wh respec o Gray-Kdd algorhm n mos cases. Algorhm DynamcRes s beng wren n he programmng language DELPHI. The algorhm requres a sequence o acves, and he ollowng parameers or each acvy A, I : - duraon o he acvy (neger p ), - array o ordnal numbers o s predecessors, denoed by P, - uns o resource requred (neger r ). Also, he npu parameer o he algorhm s oal number o resource uns avalable n he projec, denoed by R.
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 287 Oupu o algorhm are begnnngs o acves aer he resource schedulng s s s perormed,.e. he sar vecor ( 1,..., n ) o he projec acves as well as he correspondng makespan o he projec. We use he saus o each acvy, denoed wh Sa : 0, A s no sared, Sa = 1, A s nshed. In each sage o schedulng we have a schedule me, N and correspondng ses E() and A(), dened n he ollowng denons, resaed rom [9]: Denon 3.1. The se o acves whch could be sared a me whou volaon o any consrans s equal o E() = { j I Sa = 0 ( P ) Sa = 1}. (3.1) j j Denon 3.2. The se o acves whch are n progress a he me s s A() = { I }. (3.2) We now dene he noon called momen o he projec, useul n he algorhm descrpon. Ths value s represened by varable Momen n he algorhm. Denon 3.3. The momen o he projec s equal o 0 n s sar, and n each oher case he momen s equal o he mnmal me when a leas one o sared and uncompleed acves s nshed: 0, when projec sars ( = 0), Momen = mn{ j j A( )}, oherwse. We also dene momenary slack. Ths noon s acual or acves A j wh ndces belongng o E() a he me dened by momen. Denon 3.4. Momenary slack o he acvy A s equal o MSlack = Momen. Algorhm 3.1. DynamcRes Sep 1. Se he schedule me = 0, and Sa = 0 or all I. Sep 2. Compue he number o avalable resource uns by R () = R r (3.3) a A() For each j E() perorm he ollowng:
288 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm I 1 j a() j j, r R + p τ (3.4) where 1 τ j denoes he lae nsh or acvy A j, hen se s s =, = + p, R ( ) = R ( ) r ; (3.5) j j j j a a j oherwse, delay acvy A j. Ths means ha each acvy whch exceeds s own lae nsh, sarng rom he acual momen o he projec, needs o be sared here are enough resource uns avalable as s requred by. Sep 3. I E() = ; hen go o Sep 5, oherwse go o Sep 4. Sep 4. Solve he knapsack problem wh capacy R a (), where he values and volumes o arcles are equal o r, E(): mn R ( ) a E()\ A() s.. xr R (), E()\ A() a xr where x {0,1}, E(). For each sasyng x = 1 se s =, = s + p. Sep 5. Now se he new value or he varable Momen: (3.6) Momen = mn{ A( )} (3.7) and se Sa = 1 or all acves sasyng Momen. Sep 6. Se = Momen. I here are non sared acves (( I) Sa = 0), go o Sep 2. Oherwse, he makespan o he projec s equal o max { I}, and he schedule o he projec s he s = ( s 1,..., s n ). Remark 3.1 Gray-Kdd algorhm schedules acves whch have a mnmal value o he momenary slack MSlack. Oppose o hs algorhm, we propose he ollowng: se he begnnngs (lke n Sep 4.) or all acves whch concdes wh he opmal soluon o he knapsack problem (3.6). Remark 3.2. Problem (3.6) can be resaed n he ollowng equvalen orm: =
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 289 max xr E()\ A() s.. xr R (), E()\ A() a (3.8) Problem (3.8) s a one-dmensonal varan o he knapsack problem saed n [9] and [14], and a varan o he classcal 0-1 knapsack problem (see, or example [2]). In order o solve (3.8), nsead o he GRASP algorhm used n [9] and [14], we use he dynamc programmng. Thereore, we speak o ems represenng requremens o he resource. The se o weghs (volumes) as well as he se o values s equal o {r I}. To avod rval cases we assume r Rand r R, or each I. Comparng problem (3.8) I wh he dynamc programmng soluon o he knapsack problem, resaed rom [12], he ollowng analoges are evden: - he objecve uncon cos s equvalen wh x r ; E()\ A() - he knapsack sze M s equvalen wh he number o avalable resource uns, denoed by R a (), whch s dened n (3.3) and (3.5); - number N o deren ypes o ems s replaced by he cardnal number o he se I, denoed by n; - val[j] = sze[j] = r j ; - Assgnmen bes[] = j mples x j = 1 n (3.6) and (3.8). I s known ha he knapsack problem exhbs opmal subsrucure, and s opmal soluon conans whn opmal soluon o sub problems [3]. Typcally, he oal number o dsnc sub problems s a polynomal n he npu sze. When a recursve algorhm revss he same problem over and over agan, we say ha he opmzaon problem has overlappng sub problems. Dynamc programmng algorhms ypcally ake advanage o overlappng sub problems by solvng each sub problem once and hen sorng he soluon n a able [3]. Also, s known ha greedy algorhms do no always yeld opmal soluons [3]. Remark 3.3 Usng he man dea o he Gray-Kdd algorhm, n he case when we have more soluons or he knapsack problem, we use he soluon conanng acvy wh he mnmal value or MSlack. Here we consder an example o dscuss abou he derence beween he Gray- Kdd algorhm and DynamcRes algorhm. Example 3.1 Duraons, uns o he resource requred and predecessors o all acves n he projec are arranged n he ollowng able.
290 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm Acves A B C D E F G H I Duraon 4 4 2 4 3 3 6 5 2 Uns 5 5 3 6 4 5 7 3 4 Predecessors A B,C B B E F,G Assume ha R = 12 resource uns are avalable n he projec. Observe he rs acual nerval: [0, 2]. We should numerae acves A, B and C, n accordance o Gray-Kdd algorhm. Acvy B s crcal and we mark by he number 1. Acvy C has a slack o 2 days and s marked by he number 2. Fnally, acvy A has he bgges slack o 4 days and s assgned by he number 3. Acves A, B and C requre all ogeher 13 uns o he resource, so we pu he sar o acvy A a he momen 2, and schedule acves B, C. On he oher hand, usng algorhm DynamcRes we ll he knapsack o capacy 12 by objecs whose values and capaces are r 1 = 5, r 2 = 5, r 3 = 3. Thereore, he maxmal volume s lled wh volumes r 1 = 5, r 2 = 5. In accordance wh algorhm DynamcRes, s necessary o move he sar o acvy C a he momen 2. In boh algorhms, he remander o he projec sars a he momen 2. Gray-Kdd and DynamcRes gve deren soluons wh he same duraon o he projec (17 days). Here are gven wo deren soluons o he projec schedulng, rs usng DynamcRes algorhm (Fgure 3.1) and he oher usng Gray-Kdd algorhm (Fgure 3.2). Fgure 3.1. Soluon gven by DynamcRes Fgure 3.2. Soluon gven by Gray-Kdd Acves are denoed by leers A, B,..., I, and s shown how many resources each o hem requres. Here, cells n SrngGrd assgned wh he sgn > represen he oal slack or each o acves. Acves ha are sared aer her lae nsh are colored whe, oherwse are blue. Theorem 3.1 Schedule s produced by DynamcRes algorhm s easble (sases condons (2.2) and (2.3)).
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 291 Proo. Sar me s j or each acvy A j can be deermned n wo deren ways, applyng Sep 2 and Applyng Sep 4. Frsly we very Condon (2.2). Usng Sep 2 n a xed schedule me we schedule all acves whose ndces sasy j E() and (3.4) and se s j = or hese acves. On he oher hand, rom Sep 5, s sased Momen max{ Sa = 1}. Aer seng = Momen n Sep 6 s sased max{ Sa = 1}. From (3.5) we conclude ha s j = max{ Sa = 1}, or each j E() sasyng (3.4). Thereore, we conclude s ( Pj) j. In he second case, accordng o Sep 4 o DynamcRes algorhm, we conclude ha n he knapsack problem are ncluded only hese acves A j sasyng j E()\A(). Thereore, n accordance wh (3.1), all predecessors ncluded n he knapsack are nshed (( Pj) Sa = 1). Moreover, n Sep 4 we schedule acves correspondng o he opmal soluon o he knapsack problem. Analogous o he prevous case, accordng o Sep 5, condon (2.2) s sased or all acves ncluded. We now very condon (2.3). I s clear ha condon (2.3) can be wren as ( N) r R (3.9) A() In vew o (3.3), hs condon s laer equvalen wh ( N) R ( ) 0. (3.10) a Now, Sep 2 sases condon (3.10) because o (3.5) and condon (3.4). In he sequel we prove ha Sep 4 also sases (3.10). Denoe by A () he se o ndces o jus sared acves: s A'( ) = { I = }. Snce s = mples A (), we conclude A() = A() A'() aer Sep 4. A hs momen, he number o avalable resources s R () = R () r (3.11) a a A'( ) Accordng o condon n he knapsack problem (3.6), we conclude R a () 0. Takng no accoun (3.3), we ge (3.12) R () = R r r 0 a A() A'() Denoe by A () he se o jus nshed acves n Sep 6:
292 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm A''( ) = { I = Momen}. Now, n Sep 2 s sased A() = A() A'()\ A''() and applyng (3.12) we oban R () = R r r + r R r r 0. a A() A'() A''() A() A'() The proo s complee. 4. NUMERICAL EXPERIMENTS In hs secon we compare hree algorhms or resources schedulng: algorhm ncluded n MS Projec, Gray-Kdd algorhm and DynamcRes algorhm. Accordng o our assumpons o he algorhm, n MS Projec s assumed ha resources levelng canno spl ask and check box Level only whn avalable slack n Resource Levelng opons s cleared. Example 4.1. Consder he projec dened as ollows: Acves A B C D E F G H Duraon 5 4 4 9 5 5 4 4 Uns 4 5 2 6 2 3 7 8 Predecessors A B C A G Increasng he number o avalable resource uns we ge he ollowng able. The early nsh or hs example s 14 days, so we sop searchng or new soluons when all hree algorhms reach hs lm, usng he resul o lemma 2.1. Duraon o he projec Max. uns Ms Projec Gray-Kdd DynamcRes 8 26 26 26 9 25 25 22 10 22 22 22 11 22 22 22 12 22 22 22 13 22 18 18 14 18 17 18 15 18 17 18 16 18 17 14 17 18 17 14 18 14 14 14 Daa presened n he able are llusraed by he ollowng char:
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 293 Fgure 4.1. Comparson o hree mehods Average values, geomercal means and sandard devaons or projec duraons are presened n he able. Sascal uncon Ms Projec Gray-Kdd DynamcRes AVERAGE 20.45454545 19.72727273 19.09090909 Geomercal mean 20.1617992 19.39008818 18.69455204 Sandard devaon 3.559877424 3.849439156 4.036199833 The average values are mnmal or DynamcRes algorhm. Ths means ha DynamcRes produces, generally, mnmal values or makespan o he projec. Also, mehod DynamcRes produces maxmal value or he sandard devaon, because he projec makespan correspondng o hs algorhm decreases mos rapdly. Example 4.2. Acves, her duraons, maxmal uns o he resource and predecessors o he projec are dened n he able: Acves A B C D E F G H Duraon 5 4 4 9 5 5 4 4 Uns 4 5 2 6 2 3 7 8 Predecessors A B C D,F G Increasng he number o avalable resource uns we ge he ollowng able. I can easly be calculaed ha he early nsh here s 22 days.
294 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm Duraon o he projec Max. uns Ms Projec Gray-Kdd DynamcRes 8 26 26 31 9 27 27 22 10 26 26 22 11 22 22 22 We llusrae he daa n he able by he ollowng char: Fgure 4.2. Comparson o hree mehods Average values, geomercal means and sandard devaons or projec duraons are presened n he able. The conclusons are smlar as n he prevous example. Sascal uncon Ms Projec Gray-Kdd DynamcRes AVERAGE 25.25 25.25 24.25 Geomercal mean 25.17290201 25.17290201 23.96941496 Sandard devaon 2.217355783 2.217355783 4.5 Example 4.3. Projec s dened by he ollowng daa: Acves A B C D E F G H I Duraon 4 4 2 4 3 3 6 5 2 Uns 3 5 3 6 4 5 7 3 4 Predecessors A A,C B D B E F,G
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 295 Increasng he number o avalable uns o he resource, we ge he ollowng able. The early nsh or hs example s 15 days. Duraon o he projec Max. uns Ms Projec Gray-Kdd DynamcRes 7 31 29 29 8 24 22 24 9 22 22 22 10 21 21 19 11 21 21 19 12 20 18 19 13 18 18 18 14 16 16 16 15 16 16 16 16 16 16 16 17 15 15 15 The daa n he able are llusraed by he ollowng char. Fgure 4.3. Comparson o hree mehods Average values, geomercal means and sandard devaons or projec duraons are presened n he able.
296 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm Sascal uncon Ms Projec Gray-Kdd DynamcRes AVERAGE 20 19.45454545 19.36363636 Geomercal mean 19.55234723 19.097246 18.99493701 Sandard devaon 4.69041576 4.107642544 4.201731245 In hs case, he maxmal sandard devaon produces he Ms Projec. Bu, hs ac s caused by he maxmal makespan (equal o 31) or he mnmal number o Max. uns (equal o 7). Example 4.4. Consder he ollowng projec: Acves A B C D E F G H I J Duraon 6 3 6 2 4 1 4 2 4 2 Uns 6 5 7 3 4 5 7 3 2 3 Predecessors A B A,B C,E D,E D,F G,H G,H Increasng he number o avalable resource uns, we ge he ollowng able. Duraon o he projec Max. uns Ms Projec Gray-Kdd DynamcRes 7 30 30 30 8 30 30 30 9 30 30 30 10 28 30 28 11 21 23 21 12 20 20 20 13 20 20 20 14 19 19 19 The ollowng char llusraes he daa n he able.
I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm 297 Fgure 4.4. Comparson o hree mehods able. Here are gven some o sascal uncons or projec duraons represened n he Sascal uncon Ms Projec Gray-Kdd DynamcRes AVERAGE 24.75 25.25 24.75 Geomercal mean 24.27696182 24.76727954 24.27696182 Sandard devaon 5.14781507 5.2030211 5.14781507 5. CONCLUSION A new algorhm or solvng he sngle resource consraned projec schedulng problem s nroduced. A each schedule me we consder he elgble se o acves whch could be sared whou volaon o gven consrans (dened by predecessor relaonshps). Usng acves rom hs se we consder he adequae knapsack problem and use he Bellman s prncple. The possbly or he arher research can be he generalzaon o DynamcRes algorhm or solvng he mulple resource consraned projec schedulng problems, and he comparson wh GRASP algorhm rom [11]. REFERENCES [1] Bellman, R., Dynamc Programmng, Prnceon Unversy Press, 1957. [2] Borgward, K.H., and Brzank, J., Average savng eecs n enumerave mehods or solvng кnapsack problems, Journal o Complexy, 10 (1994) 129 141.
298 I. Sanmrovć, M. Pekovć, P. Sanmrovć, M. Ćrć / Heursc algorhm [3] Cormen, T. H., Leserson, C. E., and Rves, R. L., Inroducon o Algorhms, MIT Press & McGraw-Hll, 1990. [4] Osgood, N., Smulaon and Resource Smulaon and Resource- Based Schedulng, Presenaon, 2004. [5] Perć, J., Operaons Research, Savremena Admnsracja, Beograd, 1983. (In Serban) [6] Paerson, J.H., A comparson o exac approaches or solvng he mulple consraned resource projec schedulng problem, Managemen Scence, 30 (7) (1984) 854-867. [7] Daves, E.M., An expermenal nvesgaon o resource allocaon n mulacvy projecs, Operaonal Research Quarerly, 24 (11) (1976) 1186-1194. [8] Feo, T., and Resende, M.G.C., Greedy randomzed adapve search procedures, Journal o Global Opmzaon, 6 (1995) 109 134. [9] Kocheov, Y., and Solyar, A., Evoluonary local search wh varable neghborhood or he resource consraned projec schedulng problem, n: Proceedngs o he 3rd Inernaonal Workshop o Compuer Scence and Inormaon Technologes, Russa, 2003. [10] Lawrence, S.R., A compuaonal comparson o heursc schedulng echnques, Techncal Repor, Graduae School o Indusral Admnsraon, Carnege-Mellon Unversy, 1985. [11] Psouls, L.S., and Resende, M.G.C., Greedy randomzed adapve search procedures, AT&T Labs Research Techncal Repor, January 18, 2001. [12] Sedgewck, R., Algorhms, Addson-Wesley publshng company, Massachuses, Menlo Park, Calorna, London, Amserdam, Don Mlls, Onaro, Sydney, 1984. [13] Valls, V., Ballen, F., and Qunanlla, S., A populaon-based approach o he resourceconsraned projec schedulng problem, Techncal repor 10-2001, Unversy o Valenca, 2001. [14] Valls, V., Ballen, F., and Qunanlla, S., A populaon-based approach o he resourceconsraned projec schedulng problem, Annals o Operaons Research, 131 (2004) 305-324. [15] Verma, S., An opmal breadh-rs algorhm or he preempve resource-consraned projec schedulng problem, Second World Conerence on POM and 15h Annual POM Conerence, Cancun, Mexco, Aprl 30 - May 3, 2004.