A NOVEL PARTICLE SWARM OPTIMIZATION APPROACH FOR SOFTWARE EFFORT ESTIMATION

Size: px
Start display at page:

Download "A NOVEL PARTICLE SWARM OPTIMIZATION APPROACH FOR SOFTWARE EFFORT ESTIMATION"

Transcription

1 Farhad S. Gharehchopogh, I. Malek, Seyyed R. Khaze. A novel partcle swarm optmzaton approach for software effort estmaton. Internatonal Journal of Academc Research Part A; 2014; 6(2), DOI: / /6-2/A.12 Lbrary of Congress Classfcaton: T , TK A NOVEL PARTICLE SWARM OPTIMIZATION APPROACH FOR SOFTWARE EFFORT ESTIMATION Farhad Solemanan Gharehchopogh 1, Isa Malek 2, Seyyed Reza Khaze 3 1 Department of Computer Engneerng, Scence and Research Branch, Islamc Azad Unversty, West Azerbajan, 2,3 Department of Computer Engneerng, Dehdasht Branch, Islamc Azad Unversty, Dehdasht ( 1,2,3 IRAN) E-mals: bonab.farhad@gmal.com, malek.msa@gmal.com, khaze.reza@gmal.com ABSTRACT DOI: / /6-2/A.12 Receved: 25 Oct, 2013 Accepted: 03 Mar, 2014 Software Effort Estmaton (SEE) s one of the man actvtes n development of the software projects. Effort estmaton n prmary stages of development of the software s one of the mportant challenges the software projects manager faces. One of the common models of SEE s the Constructve Cost Model (COCOMO) model. In ths model, the effort for development of the software projects s a functon of the Klo Lne of Code (KLOC). The use of KLOC s a very applcable factor for effort estmaton n COCOMO model. Also, Artfcal ntellgence technques have been appled n effort estmaton very much. In ths paper, we have presented a new effort estmaton model for software projects usng Partcle Swarm Optmzaton (PSO) and have studed the effectve parameters on effort estmaton usng the PSO algorthm. The results of the paper show that the proposed model gves better estmaton n comparson to the COCOMO model for effort. Key words: Software Effort Estmaton, Partcle Swarm Optmzaton, COCOMO, KLOC 1. INTRODUCTION The software projects are the most complex products of the software engneerng whch nclude many resources and the value of any must be accurate to make project not be defeated [1]. Effort estmaton s, an mportant part of the software engneerng, playng mportant role n success of the software projects development. The accurate estmaton guarantees the success of the project and the ncorrect estmatons leads the project to be defeated and makes the software development need hgh costs and wll not meet the software needs [2]. So, the ncorrect assumptons of the software projects resources may lead the software projects to unflavored results, the correcton of whch wll need hgh costs. SEE s one of the most mportant processes n software projects development whch must be done before programmng the software projects [3]. Ths process has always been very delcate as no one or no company would start developng the software projects wthout studyng the resources or the work force and facltes [4]. The purpose of SEE to determne the scope of the project, estmate the amount of work requred and the program s scheduled to run software projects. Effort estmaton s not only an art, but also s a part of software engneerng. Many of the software buldng companes use specal methods for software development the most mportant of whch s the schedulng and groupng the works and managng the stages whch must be done at hgh accuracy level [5]. Software projects nclude the actvtes whch must be executed by constant costs and defned qualty [6]. SO, the dfferent algorthm models for work estmaton, schedulng and costs of the software projects are suggested. Algorthm models for estmaton of costs were used n 1981 by Boehm [7]. Snce then, many changes have been made to the algorthm models. COCOMO I was not a sutable model for meetng the software needs. And, COCOMO II was presented n 2000 [8]. It s used for gettng estmaton of the tme and costs actvtes. The successful management of the software projects depends on the accurate estmaton of the projects. Project manager must predct the probable problems and gve comprehensve soluton for them. Also the project manager must estmate the tme and the resources needed for the actvtes n a way that the work force used n an optmzed manner. The software projects manager must defne the delcate success factors makng the programmng and controllng processes of the project be developed to avod project be defeated and must utlze the needed lmtatons for developng the software projects [9]. The accurate effort estmaton of the software tres to make the executon procedure of the software development teams and allocaton of the resources take place accordng to the software engneerng factors and the project manager makes correctons facng any nconformty n the executon procedure [10]. So, the project manager executes the needed technques for the actvtes to meet the needs takng nto consderaton the estmaton effort. Also usng the project records s very effectve n success of the software projects and the estmaton could be done more relably. Baku, Azerbajan 69

2 We organze ths paper as follows: n Secton 2, the prevous works are presented; n Secton 3, the SEE models s ntroduced; n Secton 4, we have ntroduced the PSO; n Secton 5, the proposed model s explaned; n Secton 6, the evaluaton and the results of the proposed model s explaned and fnally n Secton 7, concluson and the future works s presented. 2. PREVIOUS WORKS The software producers always try to estmate the costs of the software projects n the prmary stages of the software development. The software manager s to make the software product effcent and n hgh qualty. So, n the most of the software projects the most mportant factor the project manager must take nto consderaton s SEE that done accordng to the software projects. So, the accurate estmaton contrbutes the software development process n estmaton of effort and software development. The use of estmaton contrbuted the software engneer evaluate the qualty of the software projects and also to contrbute the manageral decsons n project progress. Many researches have done n estmaton effort. For example, F.S. Gharehchopogh [11] has used the Artfcal Neural Networks (ANNs) for Software Cost Estmaton (SCE). He has compared 11 projects from 63 projects of NASA software project dataset n hs usng COCOMO model and has showed that the error rate of the ANNs model n less than the error rate of the COCOMO model n many cases. In [12] has utlzed Genetc Algorthm (GA) for optmzed value of the parameters of COCOMO model. One of the problems of COCOMO model s dentfcaton of the optmzed value for parameters. Accordng to the results of the experments, t s possble to say that better effort estmaton could be ganed va GA. Researchers [13] have used Fuzzy Logc (FL) for SEE n software projects. They have ntroduced SCE as one of the challenges and the mportant actvtes n software development. The suggested method of them shows that the use of FL s a model n software development. For the experments results, 15 projects of the KEMERER projects set were used. Accordng to the results, t s possble to conclude that the Mean Absolute Relatve Error (MARE) and PRED (n) (the evaluaton factor) s better n the proposed method s better than the algorthm methods. The cost functon has many parameters n software projects. Some of the factors of software process whch have drect sze on cost estmaton are Lne of Code (LOC) and KLOC. The results of the experments of them show that the MARE percent s more accurate usng the FL. In [14] GA utlzed to SEE. The accuracy of the effort estmaton adds to the valdty of the software projects and the project manager would be able to manage them better. They have showed that usng GA, the Magntude Relatve Error (MRE) rate has decreased n comparson to COCOMO model. The results of them on COCOMO dataset show that GA s better n estmaton n comparson to COCOMO model. Mult objectve partcle swarm optmzaton algorthm have utlzed [15] for optmzaton of COCOMO model parameters to mnmze the MARE. For more study on the results, they have tested the suggested model on any project. Accordng to the results of the experments, the MARE value for small projects n COCOMO model s %, and s % n suggested model, and s % n large projects n COCOMO model and s % n proposed model. The results of the experments show that the suggested model s more effcent. Researchers [16] have SCE usng the soft calculatons technques. They have utlzed FL and PSO algorthm combnaton for cost estmaton. They have used 30 projects of NASA software project dataset for the results of ther experments. Accordng to the results of the paper, the proposed model could have estmated better n comparson to the varous models and make Mean Magntude of Relatve Error (MMRE), 7.512%. In [17], t has evaluated and tested GA usng SEE. In ths research, the COCOMO model s less accurate n comparson to the artfcal ntellgence models n SEE. So, t s tred make the parameters n the proposed model more optmzed and also make the effort estmaton more accurate. In ths reference the NASA software project dataset s used for the results of the experments. Accordng to the results, the suggested model could be better n estmaton and reduce the MMRE to % n comparson to varous models. 3. THE SEE MODELS The goal of effort estmaton s the management of software projects and achevng a comprehensve vew of the costs of producng software. It s clear that the software projects effort estmaton s a basc and key part of the software engneerng. So, the software engneerng uses the effort estmaton and tres to gve a favored economc method for software projects to the project manager. Dfferent models of SEE are presented of whch we have taken nto consderaton the followng models. One of the man factors of software projects management s the accurate nformaton about the tme, effort and costs needed for the project executon. One of the most dentfed algorthmc models for SEE s the COCOMO model [7]. The COCOMO model s used for effort estmaton of dfferent software projects. The base COCOMO model s dentfed as equaton (1) for SEE. E ) b a ( Sze (1) The man factor n SEE s the effort rate needed for completng the project. In equaton (1), the parameters a and b are the naccurate estmaton of the complexty of the software and Sze s the number of the lnes of the program n KLOC whch s the mportant factor affectng the accuracy and the effcency of the estmaton [18]. Also, parameter E the amount of effort based on unts s Man-Months and ths value s drectly dependent on the sze and complexty of the project. Whatever sze and complexty of the project, the more would be the effort on 70 PART A. APPLIED AND NATURAL SCIENCES

3 the project. In COCOMO model parameters a and b depends on the sze of the project. The dfferent models of COCOMO for effort estmaton usng dfferent values of a and b are showed n Table (1). Table 1. COCOMO basc models for effort estmaton Model Name Organc Semdetached Embedded Model Equaton E = 2.4 * (KLOC) 1.05 E = 3 * (KLOC) 1.12 E = 3.6 * (KLOC) 1.20 COCOMO basc model s a project estmaton model whch dentfes the effort and software projects management usng the models of Table (1). Usng the COCOMO model t s possble to dentfy the effort estmaton and dentfy the needed actvtes for reachng the goals of the project. The man goal of COCOMO model s that all elements of the project get the same vew of the goals, stages, organzaton and the techncal and management procedures of the project and the effort of these elements are n drecton of the software projects goals. Some of varous models of SEE are presented n Table (2). These models whch are used by the software teams are the tools for contrbutng the effort estmaton and controllng the software projects. The man goal of the varous models of SEE s to be sure of the fnal results and the costs of the project. The models of Table (2) compare the software projects from fnancal, techncal and human ponts to the varous models of effort estmaton and make the technques and tools be used by the project manager n executon of the project. Table 2. Varous models of effort estmaton Model Name Halstead [19] Baley-Basl [20] Doty [21] Model Equaton E = 5.2 * (KLOC) 1.50 E = * (KLOC) 1.16 E = * (KLOC) PARTICLE SWARM OPTIMIZATION PSO algorthm s one of the swarm ntellgence algorthms whch act accordng to the populaton and random search. PSO algorthm was ntroduced by Kennedy and Eberhart n 1995 beng nspred by the brds socal behavors whch lve n small and large groups [22]. PSO algorthm s a smulaton of the socal behavor of a group of the brds lookng for food n an envronment. Any of the brds are nformed about the food place but they know n any stage that how far they are from food. So, the best procedure for fndng food s followng the nearest brd to the food. In PSO algorthm, frst the partcles of the group are created n the problem space and the search for the optmzed answer starts. In the total structure, the search of any partcle follows the other partcle whch s the most optmzed fttng functon, and also t does not forget ts own experment and follows the estate of tself n whch had the best fttng functon. In any repetton of the algorthm, any partcle changes the next poston of tself accordng to the two values, the Pbest s the best poston the partcle ever had and the Gbest s the best poston created for by all of the partcles of the populaton. Gbest s the general knowledge of the populaton and when the partcles change ther postons accordng to Gbest, n fact they try to ncrease the knowledge level of themselves to the knowledge level of the populaton. From the conceptual vew, the best partcle, relates all partcles of the group to each other. Identfcaton of the next poston for any partcle takes place by the equatons (2) and (3). v 1 w. v c1. r1.( Pbest x ) c2. r2.( Gbest x ), (2) x x v 1 1 In equaton (2), c 1 and c 2 are the two learnng parameters. Rand () functon s used to create the random numbers n [0, 1]. X parameter s the current poston and the current velocty (V) s the velocty of the partcles. The w control parameter controls the effect of V on the next velocty and creates an equlbrum state between the ablty of the algorthm n local and global search and n average we acheve the answer n the least tme. So, for optmzed operaton of the algorthm n the search space, parameter w s defned n equaton (4) [23, 24]: (3) w w Max (( wmax wmn ) ) Max (4) In equaton (4), Max s the maxmum number of the repettons of the algorthm and the parameter s the counter of the fndng optmzed answer. In equaton (4), the W max and W mn are the prmary and the fnal values of nerta weght n algorthm executon, respectvely. The value of nerta weght changes n lnear manner from 0.9 to 0.4 n the executon tme of the program. The large values of W lead to the global search and the small values of t lead to local search. To make equlbrum between local and global search, t s necessary to reduce the nerta weght n executon tme of the algorthm. So, reducng the W value, the search wll take place locally around the optmzed answer. Baku, Azerbajan 71

4 5. PROPOSED MODEL The most mportant challenge we face n development of the large and complex software projects development s value accurate SEE. Frst the software projects were small and the costs of producng them ncluded a small percent of the total costs and the error of the effort estmaton dd not affect the software executon consderably. But by the ncrease of the number, sze and mportance of the software projects and the costs of the software development, the software producton s the most expensve element n software engneerng and the ncrease of the costs has led the software teams to be defeated n producton of the software projects. The pont to be consdered n SEE s the method of selectng the sutable model among the estmaton models n whch the most accurate effort estmaton takes place for the development of the software projects. Also, one of the mportant goals of studyng SEE s studyng the accessblty of the qualty adjectves lke relablty of the effcency and success of the project. SO, when we face the software projects the aspects lke costs and utlzaton of the software are very mportant. The goal of estmaton s to provde the utlzaton and the control factors of the project and contrbutes the project manager to defne the problem makng felds. In the proposed model t s tred to use the PSO algorthm and evaluate the COCOMO model parameters and fnd the more accurate value. Flowchart of the proposed model s presented n Fgure (1). Fg. 1. Flowchart of the proposed model SEE n prmary stages of the development of the software projects s an advantage for controllng the costs. In the proposed model, the PSO algorthm s used and the most optmzed value for parameters a and b are found and replaced n COCOMO model. Fgure (2) shows the quas code of the proposed model. 1. Intalzaton Parameters 2. Evaluate Ftness 3. Loop Explore new values for parameters a, b Fndng better values for parameters a, b Evaluate the values parameters a, b Replace values a and b n COCOMO basc model Test Dataset Calculate the effort estmate Update V Update X 4. untl (not stoppng crteron) 5. Return the best effort Fg. 2. Quas code of the proposed model Fgure (3) shows the mplementaton of SEE usng PSO n C#.NET 2008 programmng language envronment. 72 PART A. APPLIED AND NATURAL SCIENCES

5 6. EVALUATION AND RESULTS Fg. 3. Implementaton of SEE usng PSO SEE the base of whch s effort and qualty of the software projects, s one of the procedures of the success of the software projects and s very mportant many software projects. Dfferent methods are presented for SEE any of whch try to present the accurate estmaton of the costs of the software producton. In ths paper the KEMERER [25] dataset s used for evaluaton and results. Table 3. KEMERER dataset [25] Project No KLOC Actual Effort In Table (3) the actual effort estmaton values are shown. Although many algorthms are presented for effort estmaton, each of them acheves dfferent values for software projects development. In PSO algorthm, there are some parameters affectng the operaton of the algorthm. The proposed model populaton number the 1000 and the number of teratons of the algorthm have consdered 100 and also parameters value are C1, C2 = 1.5 whch theses contrbute to partcles learnng n effort estmate more accurate. Table 4. Comparson varous models of effort estmate to the proposed model Project No KLOC Actual Effort COCOMO Estmate Halstead Estmate Baley-Basl Estmate Doty Estmate Proposed Estmate In Table (4) estmaton usng the fve models SEE s shown. Also, n Table (4) the COCOMO basc model s used for effort estmaton. The results of the experments of Table (4) show that there s no specfc control on the effort estmaton of the software projects and often the work done for development of a software project s estmated more or less than the real value accordng to the dfferent models. In contrast, the proposed model estmates the more actual value n comparson to the algorthmc models. In effort estmaton models of the Table (4), the proposed model estmates the value very close to the actual model. From the effort pont of vew, the Baku, Azerbajan 73

6 proposed model has led to the changes n the actual model and these changes play mportant role n costs of effort estmaton of the software projects. So, the proposed model s very benefcary for effort estmaton and could estmate the effort better n comparson to the varous models. To evaluate the actual estmaton and proposed model of the effort estmaton factor, the KLOC s used. In Fgure (4), the comparson dagram of actual estmaton and proposed model s showed. Fg. 4. The comparson of effort estmaton of proposed model to the actual effort In Fgure (5) the comparson of effort estmaton of proposed model and the COCOMO model s presented. As t could be seen, the proposed model gves more favored results. Fg. 5. The comparson of SEE of proposed model to the COCOMO model For effcency measurng of the proposed model wth other models, MMRE factor s compared. MMRE s dentfed accordng to the equaton (5) [26]. MMRE 1 N N 1 Actual Effort Actual Estmated Effort Effort (5) In Table (5), the comparson of the effcency measurng of the proposed model to the varous models s presented. Table 5. The comparson of effcency of the varous models to the proposed model Model Name COCOMO Halstead Baley-Basl Doty Proposed MMRE (%) The results of the comparsons of the Table (5) show that the proposed model gves a better estmaton n comparson to the varous models and as t s clear the proposed model s more accurate than COCOMO model. In Fgure (6), MMRE the comparson flowchart of the varous models s presented. 74 PART A. APPLIED AND NATURAL SCIENCES

7 Fg. 6. MMRE the comparson flowchart of the varous models to proposed model In Fgure (6) t s clear that the effcency of the dfferent modes of effort estmaton s dfferent n results from MMRE pont of vew and the proposed model s MMRE less effcent n comparson to the varous models whch show that the proposed model s more accurate n estmaton. 7. CONCLUSION AND FUTURE WORKS Software projects development s very complex n nature and many resources must be estmated before project executon procedure. Also, often the software companes try to ncrease the software projects qualty and reduce the development costs of t. So, SEE must take place for development of the software projects for project manager to better support the process. Effort estmaton of the software projects s a key parameter n project management. Achevng ths goal needs accurate and relable effort estmaton and the estmaton takes place accordng to the project condtons. In ths paper, the effort estmaton s done by PSO algorthm and as t s seen n the results of the comparsons the effort estmaton of the proposed model s more accurate than the COCOMO model and the varous. We hope n future, wll desgn and mplement an algorthm for SEE whch wll estmate other software factors as accurate as effort and wll be effectve n software projects management. REFERENCES 1. L.L. Mnku, X. Yao, Ensembles and localty: Insght on Improvng Software Effort Estmaton, Informaton and Software Technology, Vol. 55, pp , (2013). 2. A. Sharma, D.S. Kushwaha, Estmaton of Software Development Effort from Requrements Based Complexty, Proceda Technology, Vol. 4, pp , (2012). 3. M. Jørgensen, Contrastng deal and realstc condtons as a means to mprove judgment-based software development effort estmaton, Informaton and Software Technology, Vol. 53, Issue 12, pp , Elsever B.V, (December 2011). 4. H. Park, S. Baek, An Emprcal Valdaton of a Neural Network Model for Software Effort Estmaton, Expert Systems wth Applcatons, Vol. 35, pp , (2008). 5. N.H. Chu, S.J. Huang, The Adjusted Analogy-Based Software Effort Estmaton Based on Smlarty Dstances, the Journal of Systems and Software, Vol. 80, pp , (2007). 6. P.C. Pendharkar, Probablstc Estmaton of Software Sze and Effort, Expert Systems wth Applcatons, Vol. 37, Issue 6, pp , Elsever Ltd, June (2010). 7. B.W. Boehm, Software Engneerng Economcs, Prentce-Hall, Englewood Clffs, New Jersy, (1981). 8. B.W. Boehm, Software Cost Estmaton wth COCOMO II, Prentce Hall PTR, Englewood Clffs, New Jersy, (2000). 9. J.S. Chou, C.C. Wu, Estmatng Software Project Effort for Manufacturng Frms, Computers n Industry, Vol. 64, pp , Elsever B.V, (2013). 10. E. Khatb, R. Ibrahm, Effcent Indcators to Evaluate the Status of Software Development Effort Estmaton nsde the Organzatons, Internatonal Journal of Managng Informaton Technology (IJMIT), Vol.4, No.3, pp , (2012). 11. F.S. Gharehchopogh, Neural Networks Applcaton n Software Cost Estmaton: A Case Study, 2011 Internatonal Symposum on Innovatons n Intellgent Systems and Applcatons (INISTA 2011), pp , IEEE, Istanbul, Turkey, (15-18 June 2011). 12. A.F. Sheta, Estmaton of the COCOMO Model Parameters Usng Genetc Algorthms for NASA Software Projects, Journal of Computer Scence, Vol. 2, No. 2, pp , (2006). 13. A. Mttal, K. Parkash, H. Mttal, Software Cost Estmaton Usng Fuzzy Logc, ACM SIGSOFT Software Engneerng, Vol. 35, No. 1, pp. 1-7, (2010). 14. S. Joseph.K, T. Ravchandran, Genetc approach for Software Effort Estmaton: A Varant for COCOMO, Internatonal Journal of Computer Applcatons & Informaton Technology Vol. 1, Issue 3, pp , (2012). 15. Prasad Reddy P.V.G.D, Har CH.V.M.K, S. Rao.T, Mult Objectve Partcle Swarm Optmzaton for Software Cost Estmaton, Internatonal Journal of Computer Applcatons, Vol. 32, No.3, pp , (2011). Baku, Azerbajan 75

8 16. Zauddn, Sh. K. Tpu, K. Zaman, Sh. Za, Software Cost Estmaton Usng Soft Computng Technques, Advances n Informaton Technology and Management (AITM),Vol. 2, No. 1, pp , (2012). 17. B.K. Sngh, A. K. Msra, Software Effort Estmaton by Genetc Algorthm Tuned Parameters of Modfed Constructve Cost Model for NASA Software Projects, Internatonal Journal of Computer Applcatons, Vol. 59, No.9, pp , (December 2012). 18. T. Menzes, D. Port, Z. Chen, J. Hhn, S. Stukes, Valdaton methods for calbratng software effort models, 27th nternatonal conference on Software Engneerng (ICSE 05), New York, NY, USA, pp , (2005). 19. L.M. Lard, M.C. Brennan, Software Measurement & Estmaton: A Practcal Approach, Wley-IEEE Computer Socety, 1edton,280 pages, (2006). 20. J.W. Baley and V.R. Basl, A Meta-Model for Source Development Resource Expendtures, 5th Internatonal Conference on Software Engneerng, pp , (1981). 21. J.R. Herd, J.N. Postak, W.E. Russel, K. R. Stewart, Software Cost Estmaton Study-Study Results, Doty Assocates, Inc., Rockvlle, MD, Fnal Techncal Report No. RADC-TR , Vol. 1, (1977). 22. J. Kennedy, R. C. Eberhart, "Partcle Swarm Optmzaton", IEEE Internatonal Conference on Neural Networks, pp , (1995). 23. Y. Sh, R.C. Eberhart, A modfed partcle swarm optmzer, IEEE Internatonal Conference on Evolutonary Computaton, pp , Anchorage, AK, (1998). 24. Y. Sh, R.C. Eberhart, Parameter selecton n partcle swarm optmzaton, In Proceedngs of Evolutonary Computaton VII (EP98), Sprnger-Verlag, pp , San Dego, Calforna, USA, (1998). 25. C.F. Kemerer, An Emprcal Valdaton of Software Cost Estmaton Models, Communcaton of the ACM, Vol. 30, No 5,pp: , (May 1987). 26. S.G. MacDonell, A.R. Gray, A Comparson of Modelng Technques for Software Development Effort Predcton, n Proceedngs of Internatonal Conference on Neural Informaton Processng and Intellgent Informaton Systems, pp , (1997). 76 PART A. APPLIED AND NATURAL SCIENCES