Ants Can Schedule Software Proects Broderck Crawford 1,2, Rcardo Soto 1,3, Frankln Johnson 4, and Erc Monfroy 5 1 Pontfca Unversdad Católca de Valparaíso, Chle FrstName.Name@ucv.cl 2 Unversdad Fns Terrae, Chle 3 Unversdad Autónoma de Chle, Chle 4 Unversdad de Playa Ancha, Chle FrstName.Name@upla.cl 5 LINA, Unversté de Nantes, France FrstName.Name@unv-nantes.fr Abstract. Ths paper presents the desgn of an algorthm based on Ant Colony Optmzaton paradgm to solve the Software Proect Schedulng Problem. Ths problem conssts n decdng who does what durng the software proect development, fndng an optmal schedule for a proect so that the precedence and resource constrants are satsfed and the fnal proect cost and ts duraton are mnmzed. We present the desgn of an general ant algorthm to solve t. Keywords: Software Engneerng, Software Proect Schedulng Problem, Proect Management, Ant Colony Optmzaton. 1 Introducton We present the desgn of an algorthm based on Ant Colony Optmzaton (ACO) paradgm to solve the Software Proect Schedulng Problem (SPSP). The SPSP s related to the Resource-Constraned Proect Schedulng (RCPS), an exstng problem very popular n the lterature. It s a problem of fndng an optmal schedule for a proect so that the precedence and resource constrants are satsfed and the fnal proect cost consstng of personal salares and proect duraton s mnmzed. The RCPS s known to be a NP-hard optmzaton problem. That means that s not possble to fnd an effcent algorthm to optmally solve largesze nstances n reasonable computatonal tme. Most of the methods used for solvng the problem belong to the class of prorty-rule-based-methods or to the class of metaheurstc. The frst knd of methods starts wth none of the obs beng scheduled. Subsequently, a sngle schedule s constructed by selectng a subset of obs n each step and assgnng startng tmes to these obs untl all obs have been consdered. By other sde, metaheurstcs mprove an ntal soluton executng operatons whch transform one or several solutons nto others. ACO has demonstrated to solve several NP-hard combnatoral problems effectvely [5]. We beleve that the constructve nature of ACO s effectve attackng ths problem. C. Stephands (Ed.): Posters, Part I, HCII 2013, CCIS 373, pp. 635 639, 2013. c Sprnger-Verlag Berln Hedelberg 2013
636 B. Crawford et al. Item Table 1. SPSP Model Descrpton S = {s 1,..., s sk } set of sklls assocated wth software proects T = {t 1,..., t T } set of tasks necessary for the proect G(V,A) precedence graph defned n the proect s Gantt V = {t 1,t 2,..., t T } s a vertex set conssted of all tasks A = {(t,t ),..., (t n,t T )} s an arc set, the task t must be done before t t sklls s a set of sklls for the task. It s a subset of S t effors s a effort person-months to complete the task t EM = {e 1,..., e E} s a set of employees e sklls s the set of sklls of e. It s a subset of S e maxded s the maxmum degree of dedcaton of e, e (0, 1) s the monthly salary of e e salary 2 The Software Proect Schedulng Problem SPSP s one of the most common problems n managng software engneerng proects [12]. It conssts n decdng who does what durng the software proect lfetme. SPSP should consder salares and employee sklls whch must be assgned to proect tasks accordng to the requrements of these tasks [14,2]. We descrbe the model n Table 1: The SPSP soluton can be represented as a matrx M =[E T ]andm [0, 1] whch represents the degree of dedcaton of employee e to task t.if m = 0 the employee e s not assgned to task t,fm = 1 the employee e work all day n task t. We defne some constrants to be feasble solutons from the matrx M, frst, all tasks are assgned at least one employee: E m > 0 {1,..., T } (1) =1 Second, the employees assgned have all the necessary sklls to carry out the task. for ths all m > 0, t sklls s a subset of the unon e sklls {1,...,E} for {1,..., T }. It follows that the sklls needed for the task t are a subset of the unon of the sklls the employees assgned to the task. To evaluate the qualty of the solutons should be evaluated the feasblty of the soluton, the whole proect cost and duraton of the proect. We calculate the duraton t dur, {1,..., T } for each task accordng to the soluton matrx as the followng formula: t dur = teffort E =1 m (2) Now we can calculate the start tme t start andtheendtmet end for task. We must consder tasks wthout precedence, n ths case the start tme t start and the end tme s t end = t start + t dur =0,. To calculate the start tme of tasks
Ants Can Schedule Software Proects 637 wth precedence, must be calculated frst the end tme for all prevous tasks. In ths case t start s defned as t start = max{t end (t,t ) A} else 0. For the total duraton of a proect p dur ust need the end tme of task that ends later. We can calculate as p dur = max{t end k (t,t k ) / A}. For the total cost of the software proect we need to calculate the cost of each task and then the total cost s the sum of costs accordng to the followng formulas: t cost = E =1 e salary m t dur (3) p cost = T =1 t cost (4) The target s mnmze the proect duraton p dur and the total cost p cost of proect. Therefore a ftness functon s used, where w cost and w dur are values weghtng the relatve mportance of the total cost and duraton of the whole proect. Then, the ftness fucton to mnmze s gven by: f(x) =(w cost p cost + w dur p dur ) (5) 3 ACO for Schedule Software Proect Ant Colony Optmzaton (ACO) s a Swarm Intellgence technque whch nspred from the foragng behavor of real ant colones. The artfcal ants seek the solutons accordng to a constructve procedure as descrbed n [9,6]. Ths ACO explots an optmzaton mechansm for solvng dscrete optmzaton problems n varous engneerng doman [7,11]. To adapt SPSP to ACO usng a Hyper-Cube Framework (ACO-HC) [10] must establsh an approprate constructon graph and defne the use of pheromone and heurstc nformaton assocated wth the specfed problem [4,1]. The constructon graph structure and pheromone matrx, wth the respectve ACO-HC algorthm s presented n the followng subsectons. Ths algorthm makes the assocaton of employees to tasks accordng to the needs of the tasks, evaluatng the qualty of the soluton [13]. 3.1 Constructon Graph The ants travel through the constructon graph startng from an ntal pont and select the nodes whch travel accordng to a probablty functon that s gven by the pheromone and heurstc nformaton of the problem, ther relatve nfluence s gven by α and β respectvely[3,8]. The proposed constructon graph makes the assocaton of employees for each task. The constructon graph conssts of each employee and the rato of dedcaton contrbutons of employees for the task defned as ded [0, 1] Ths structure s presented n Fg 1. The ants travel through the constructon graph selectng ways of probablstcally way. Usng the followng functon: p t = [τ ] α [η ] β ded l=0 [τ l] α, {1,..., ded} (6) β [η l ]
638 B. Crawford et al. e 1 e 2 e E 0.0 start 0.25 end 1.0 Fg. 1. Constructon Graph, CG =[ded E] Where τ s the pheromone and η s the heurstc nformaton of the problem on the path between node to n the graph CG for de t task. The heurstc nformaton can be defned accordng to the mportance of the task. 3.2 Pheromone In the hyper-cube framework the pheromone trals are forced to stay n the nterval [0, 1].We represent computatonally the evaporaton of pheromone and n addton the amount of pheromone n the ant path through the graph, once s completed a tour usng the followng formula: τ =(1 ρ)τ + ρδτ k (7) Where ρ s a rate of evaporaton ρ ]0, 1]. And Δτ t s assocated wth qualty of the current soluton of ant k. We can use a updatng pheromone strategy consderng the cost and duraton of the whole proect as follows [10]: Δτ k = ((w cost p cost + w dur p dur ) 1 ) k m h=1 ((w costp cost + w dur p dur ) 1 ) h (8) 3.3 Algorthm Descrpton ACO-HC algorthm to solve the software proect schedulng problem can be brefly descrbed as follow: Step 1: to ntalze the pheromone values and splttng tasks. Step 2: to allocate frst ant n the ntal node. Step 3: each ant travels on the graph choosng nodes (t s to fx the dedcaton degree of one employee n the task). Step 4: when the tours are fnshed, a soluton matrx s determned per each ant. Step 5: to evaluate the qualty of the solutons. Step 6: to calculate the duraton and cost of the whole software proect and to evaluate ts feasblty. Step 7: to select the best soluton and update the pheromone values. Step 8: to repeat the steps (3-7) untl the termnaton condton s satsfed (teratons). Step 9: to obtan the best soluton accordng to the ftness.
Ants Can Schedule Software Proects 639 4 Concluson We presented an overvew to the resoluton of the SPSP usng an ACO-HC framework. We desgn a representaton of the problem n order to ACO algorthm can solve t, proposng a constructon graph and a pertnent heurstc nformaton. Furthermore, we defned a ftness functon able to allow optmzaton of the generated solutons. References 1. Abdallah, H., Emara, H.M., Dorrah, H.T., Bahgat, A.: Usng ant colony optmzaton algorthm for solvng proect management problems. Expert Systems wth Applcatons 36(6), 10004 10015 (2009) 2. Barreto, A., de Olvera Barros, M., Werner, C.M.L.: Staffng a software proect: A constrant satsfacton and optmzaton-based approach. Comput. Oper. Res. 35(10), 3073 3089 (2008) 3. Berrch, A., Yalaou, F., Amodeo, L., Mezghche, M.: B-obectve ant colony optmzaton approach to optmze producton and mantenance schedulng. Computers and Operatons Research 37(9), 1584 1596 (2010) 4. Chen, W., Zhang, J.: Ant colony optmzaton for software proect schedulng and staffng wth an event-based scheduler. IEEE Transactons on Software Engneerng 39(1), 1 17 (2013) 5. Crawford, B., Castro, C.: Integratng lookahead and post processng procedures wth ACO for solvng set parttonng and coverng problems. In: Rutkowsk, L., Tadeusewcz, R., Zadeh, L.A., Żurada, J.M. (eds.) ICAISC 2006. LNCS (LNAI), vol. 4029, pp. 1082 1090. Sprnger, Hedelberg (2006) 6. Dorgo, M., D Caro, G.: Ant colony optmzaton: a new meta-heurstc. In: Proceedngs of the 1999 Congress on Evolutonary Computaton, CEC 1999, vol. 2, p. 1477 (1999) 7. Dorgo, M., Gambardella, L.M.: Ant colony system: A cooperatve learnng approach to the travelng salesman problem. IEEE Transactons on Evolutonary Computaton (1997) 8. Dorgo, M., Manezzo, V., Colorn, A.: The ant System: Optmzaton by a colony of cooperatng agents. IEEE Transactons on Systems, Man, and Cybernetcs Part B: Cybernetcs 26(1), 29 41 (1996) 9. Dorgo, M., Stutzle, T.: Ant Colony Optmzaton. MIT Press, USA (2004) 10. Johnson, F., Crawford, B., Palma, W.: Hypercube framework for aco appled to tmetablng. In: Bramer, M. (ed.) Arttcal Intellgence n Theory and Practce. IFIP, vol. 217, pp. 237 246. Sprnger, Boston (2006) 11. Lao, T.W., Egbelu, P., Sarker, B., Leu, S.: Metaheurstcs for proect and constructon management a state-of-the-art revew. Automaton n Constructon 20(5), 491 505 (2011) 12. Ozdamar, L., Ulusoy, G.: A survey on the resource-constraned proect schedulng problem. IIE Transactons 27(5), 574 586 (1995) 13. Rubo, J.M., Crawford, B., Johnson, F.: Solvng the unversty course tmetablng problem by hypercube framework for aco. In: Cordero, J., Flpe, J. (eds.) ICEIS (2), pp. 531 534 (2008) 14. Xao, J., Ao, X.-T., Tang, Y.: Solvng software proect schedulng problems wth ant colony optmzaton. Computers and Operatons Research 40(1), 33 46 (2013)