Top Banner
Zong Woo Geem Recent Advances in Harmony Search Algorithm
178

HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

May 04, 2023

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Zong Woo Geem

Recent Advances in Harmony Search Algorithm

Page 2: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Studies in Computational Intelligence,Volume 270

Editor-in-ChiefProf. Janusz KacprzykSystems Research InstitutePolish Academy of Sciencesul. Newelska 601-447 WarsawPolandE-mail: [email protected]

Further volumes of this series can be found on ourhomepage: springer.com

Vol. 249.Wesam Ashour Barbakh,Ying Wu, and Colin FyfeNon-Standard Parameter Adaptation for Exploratory DataAnalysis, 2009ISBN 978-3-642-04004-7

Vol. 250. Raymond Chiong and Sandeep Dhakal (Eds.)Natural Intelligence for Scheduling,Planning and PackingProblems, 2009ISBN 978-3-642-04038-2

Vol. 251. Zbigniew W. Ras and William Ribarsky (Eds.)Advances in Information and Intelligent Systems, 2009ISBN 978-3-642-04140-2

Vol. 252. Ngoc Thanh Nguyen and Edward Szczerbicki (Eds.)Intelligent Systems for Knowledge Management, 2009ISBN 978-3-642-04169-3

Vol. 253. Roger Lee and Naohiro Ishii (Eds.)Software Engineering Research, Management andApplications 2009, 2009ISBN 978-3-642-05440-2

Vol. 254. Kyandoghere Kyamakya,Wolfgang A. Halang,Herwig Unger, Jean Chamberlain Chedjou,Nikolai F. Rulkov, and Zhong Li (Eds.)Recent Advances in Nonlinear Dynamics andSynchronization, 2009ISBN 978-3-642-04226-3

Vol. 255. Catarina Silva and Bernardete RibeiroInductive Inference for Large Scale Text Classification, 2009ISBN 978-3-642-04532-5

Vol. 256. Patricia Melin, Janusz Kacprzyk, andWitold Pedrycz (Eds.)Bio-inspired Hybrid Intelligent Systems for Image Analysisand Pattern Recognition, 2009ISBN 978-3-642-04515-8

Vol. 257. Oscar Castillo,Witold Pedrycz, andJanusz Kacprzyk (Eds.)Evolutionary Design of Intelligent Systems in Modeling,Simulation and Control, 2009ISBN 978-3-642-04513-4

Vol. 258. Leonardo Franco, David A. Elizondo, andJose M. Jerez (Eds.)Constructive Neural Networks, 2009ISBN 978-3-642-04511-0

Vol. 259. Kasthurirangan Gopalakrishnan, Halil Ceylan, andNii O.Attoh-Okine (Eds.)Intelligent and Soft Computing in Infrastructure SystemsEngineering, 2009ISBN 978-3-642-04585-1

Vol. 260. Edward Szczerbicki and Ngoc Thanh Nguyen (Eds.)Smart Information and Knowledge Management, 2009ISBN 978-3-642-04583-7

Vol. 261. Nadia Nedjah, Leandro dos Santos Coelho, andLuiza de Macedo de Mourelle (Eds.)Multi-Objective Swarm Intelligent Systems, 2009ISBN 978-3-642-05164-7

Vol. 262. Jacek Koronacki, Zbigniew W. Ras,Slawomir T.Wierzchon, and Janusz Kacprzyk (Eds.)Advances in Machine Learning I, 2009ISBN 978-3-642-05176-0

Vol. 263. Jacek Koronacki, Zbigniew W. Ras,Slawomir T.Wierzchon, and Janusz Kacprzyk (Eds.)Advances in Machine Learning II, 2009ISBN 978-3-642-05178-4

Vol. 264. Olivier Sigaud and Jan Peters (Eds.)From Motor Learning to Interaction Learning in Robots, 2009ISBN 978-3-642-05180-7

Vol. 265. Zbigniew W. Ras and Li-Shiang Tsay (Eds.)Advances in Intelligent Information Systems, 2009ISBN 978-3-642-05182-1

Vol. 266.Akitoshi Hanazawa, Tsutom Miki,and Keiichi Horio (Eds.)Brain-Inspired Information Technology, 2009ISBN 978-3-642-04024-5

Vol. 267. Ivan Zelinka, Sergej Celikovsky, Hendrik Richter,and Guanrong Chen (Eds.)Evolutionary Algorithms and Chaotic Systems, 2010ISBN 978-3-642-10706-1

Vol. 268. Johann M.Ph. Schumann and Yan Liu (Eds.)Applications of Neural Networks in High Assurance Systems,2010ISBN 978-3-642-10689-7

Vol. 269. Francisco Fernandez de de Vega andErick Cantu-Paz (Eds.)Parallel and Distributed Computational Intelligence, 2010ISBN 978-3-642-10674-3

Vol. 270. Zong Woo GeemRecent Advances in Harmony Search Algorithm, 2010ISBN 978-3-642-04316-1

Page 3: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Zong Woo Geem

Recent Advances in HarmonySearch Algorithm

123

Page 4: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Dr. Zong Woo GeemiGlobal University

7700 Little River Tpke. #600

Annandale,Virginia 22003

USA

E-mail: [email protected]

ISBN 978-3-642-04316-1 e-ISBN 978-3-642-04317-8

DOI 10.1007/978-3-642-04317-8

Studies in Computational Intelligence ISSN 1860-949X

Library of Congress Control Number: 2009943375

c© 2010 Springer-Verlag Berlin Heidelberg

This work is subject to copyright. All rights are reserved, whether the whole or partof the material is concerned, specifically the rights of translation, reprinting, reuseof illustrations, recitation, broadcasting, reproduction on microfilm or in any otherway, and storage in data banks. Duplication of this publication or parts thereof ispermitted only under the provisions of the German Copyright Law of September 9,1965, in its current version, and permission for use must always be obtained fromSpringer. Violations are liable to prosecution under the German Copyright Law.

The use of general descriptive names, registered names, trademarks, etc. in thispublication does not imply, even in the absence of a specific statement, that suchnames are exempt from the relevant protective laws and regulations and thereforefree for general use.

Typeset & Cover Design: Scientific Publishing Services Pvt. Ltd., Chennai, India.

Printed in acid-free paper

9 8 7 6 5 4 3 2 1

springer.com

Page 5: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Preface

Nowadays, music-inspired phenomenon-mimicking harmony search algorithm is fast growing with many applications. One of key success factors of the algorithm is the employment of a novel stochastic derivative which can be used even for discrete variables. Instead of traditional calculus-based gradient, the algorithm utilizes musi-cian’s experience as a derivative in searching for an optimal solution. This can be a new paradigm and main reason in the successes of various applications.

The goal of this book is to introduce major advances of the harmony search al-gorithm in recent years. The book contains 14 chapters with the following sub-jects: State-of-the-art in the harmony search algorithm structure by Geem; robotics (robot terrain and manipulator trajectory) by Xu, Gao, Wang, Xue, Tangpattana-kul, Meesomboon, and Artrit; visual tracking by Fourie, Mills, and Green; web text data mining by Forsati and Mahdavi; power flow planning by Panigrahi, Pandi, Das, and Abraham; fuzzy control system by Coelho and Bernert; hybridiza-tion (with Taguchi method or SQP method) by Yildiz, Öztürk, and Fesanghary; groundwater management by Ayvaz; irrigation by Cisty; logistics by Bo, Huang, Ip, and Wang; timetabling by Al-Betar, Khader, and Liao; and bioinformatics (RNA structure prediction) by Mohsen, Khader, and Ramachandram.

This book collects the above-mentioned theory and applications, which are dis-persed in various technical publications, so that readers can have a good grasp of current status of the harmony search algorithm and foster new breakthroughs in their fields using the algorithm.

Finally, I, as an editor and musician, would like to share the joy of the publica-tion with all the people who like both music and computational optimization.

Zong Woo Geem Editor

Page 6: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Contents

State-of-the-Art in the Structure of Harmony SearchAlgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Zong Woo Geem

Harmony Search Optimization Algorithm: Application to aReconfigurable Mobile Robot Prototype . . . . . . . . . . . . . . . . . . . . . 11He Xu, X.Z. Gao, Tong Wang, Kai Xue

Optimal Trajectory of Robot Manipulator Using HarmonySearch Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Panwadee Tangpattanakul, Anupap Meesomboon, Pramin Artrit

Visual Tracking Using Harmony Search . . . . . . . . . . . . . . . . . . . . . . 37Jaco Fourie, Steven Mills, Richard Green

Web Text Mining Using Harmony Search . . . . . . . . . . . . . . . . . . . . 51Rana Forsati, Mehrdad Mahdavi

Population Variance Harmony Search Algorithm to SolveOptimal Power Flow with Non-Smooth Cost Function . . . . . . . 65B.K. Panigrahi, V. Ravikumar Pandi, Swagatam Das,Ajith Abraham

A Harmony Search Approach Using ExponentialProbability Distribution Applied to Fuzzy Logic ControlOptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Leandro dos Santos Coelho, Diego L. de A. Bernert

Hybrid Taguchi-Harmony Search Approach for ShapeOptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Ali Rıza Yildiz, Ferruh Ozturk

Page 7: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

VIII Contents

An Introduction to the Hybrid HS-SQP Method and ItsApplications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Mohammad Fesanghary

Solution of Groundwater Management Problems UsingHarmony Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111M. Tamer Ayvaz

Application of the Harmony Search Optimization inIrrigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Milan Cisty

The Application of Harmony Search in Fourth-PartyLogistics Routing Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Guihua Bo, Min Huang, W.H. Ip, Xingwei Wang

A Harmony Search with Multi-pitch Adjusting Rate forthe University Course Timetabling . . . . . . . . . . . . . . . . . . . . . . . . . . 147Mohammed Azmi Al-Betar, Ahamad Tajudin Khader, Iman Yi Liao

An Optimization Algorithm Based on Harmony Search forRNA Secondary Structure Prediction . . . . . . . . . . . . . . . . . . . . . . . . 163Abdulqader M. Mohsen, Ahamad Tajudin Khader,Dhanesh Ramachandram

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Page 8: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 1–10. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

State-of-the-Art in the Structure of Harmony Search Algorithm

Zong Woo Geem*

Abstract. The harmony search algorithm has been so far applied to various opti-mization problems. Also, the algorithm structure has been customized on a case-by-case basis by tweaking the basic structure. The objective of this chapter is to introduce the state-of-the-art structure of the basic harmony search algorithm.

1 Introduction

For optimization, people have traditionally used calculus-based algorithms that give gradient information in order to find the right direction to the optimal solu-tion. However, if variables are discrete instead of continuous, they cannot have derivatives. To overcome this situation, the harmony search (HS) algorithm has used a novel stochastic derivative [1] which utilizes the experiences of musicians in Jazz improvisation and can be applicable to discrete variables. Instead of the inclination information of an objective function, the stochastic derivative of HS gives a probability to be selected for each value of a decision variable. For exam-ple, if the decision variable x1 has three candidate values {1, 2, 3}, the partial stochastic derivative of the objective function with respect to x1 at each discrete value gives the selection probability for each value like 20% for 1; 30% for 2; and 50% for 3. While cumulative probability becomes unity (100%), the prob-ability for each value is updated iteration by iteration. Desirably the value, which is included in the optimal solution vector, has higher chance to be chosen as the iterations progress.

With this stochastic derivative information, the HS algorithm has been applied to various science and engineering optimization problems that include [2, 3]:

Real-world applications • Music composition • Sudoku puzzle • Timetabling • Tour planning • Logistics

Zong Woo Geem Environmental Planning and Management Program, Johns Hopkins University, Baltimore, Maryland, USA E-mail: [email protected]

Page 9: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

2 Z.W. Geem

Computer science problems • Web page clustering • Text summarization • Internet routing • Visual tracking • Robotics

Electrical engineering problems

• Energy system dispatch • Photo-electronic detection • Power system design • Multi-level inverter optimization • Cell phone network

Civil engineering problems

• Structural design • Water network design • Dam scheduling • Flood model calibration • Groundwater management • Soil stability analysis • Ecological conservation • Vehicle routing

Mechanical engineering problems

• Heat exchanger design • Satellite heat pipe design • Offshore structure mooring

Bio & medical applications

• RNA structure prediction • Hearing aids • Medical physics

In addition to the above-mentioned various applications, the HS algorithm also

has various algorithm structures that can be applicable to so many different prob-lems. Thus, this chapter arranges the basic structure of the HS algorithm so that users can easily customize the algorithm for their own optimization problems.

2 Basic Structure of Harmony Search Algorithm

The HS algorithm was originally inspired by the improvisation process of Jazz musicians. Figure 1 shows the analogy between improvisation and optimization: Each musician corresponds to each decision variable; musical instrument’s pitch range corresponds to decision variable’s value range; musical harmony at certain

Page 10: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

State-of-the-Art in the Structure of Harmony Search Algorithm 3

time corresponds to solution vector at certain iteration; and audience’s aesthetics corresponds to objective function. Just like musical harmony is improved time af-ter time, solution vector is improved iteration by iteration.

Fig. 1 Analogy between Improvisation and Optimization

This section introduces each step of the HS algorithm in detail, including 1) problem formulation, 2) algorithm parameter setting, 3) random tuning for mem-ory initialization, 4) harmony improvisation (random selection, memory consid-eration, and pitch adjustment), 5) memory update, 6) performing termination, and 7) cadenza.

2.1 Problem Formulation

The HS algorithm was devised for solving optimization problems. Thus, in order to apply HS, problems should be formulated in the optimization environment, hav-ing objective function and constraints:

Optimize (minimize or maximize) )(xf (1)

Subject to

pihi ,,1;0)( …==x ; (2)

qigi ,,1;0)( …=≥x . (3)

)}(,),(,),1({ iiiiii Kxkxxx ……=∈ X or Uii

Li xxx ≤≤ (4)

Page 11: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

4 Z.W. Geem

The HS algorithm searches entire solution area in order to find the optimal so-lution vector ),,( 1 nxx …=x , which optimizes (minimizes or maximizes) the ob-

jective function as in Equation 1. If the problem has equality and/or inequality conditions, these can be considered as constraints in Equations 2 and 3. If the de-cision variable has discrete values, the set of candidate values for the variable be-comes )}(,),(,),1({ iiiiii Kxkxxx ……=∈ X ; and if the decision variable has

continuous values, the set of candidate values for the variable becomes Uii

Li xxx ≤≤ .

The HS algorithm basically considers the objective function only. However, if a solution vector generated violates any of the constraints, 1) the algorithm abandons the vector or 2) considers it by adding certain amount of penalty to the objective function value. Also, HS can be applied to multi-objective problems by conjugating with Pareto set.

2.2 Algorithm Parameter Setting

Once the problem formulation is ready, algorithm parameters should be set with certain values. HS contains algorithm parameters including harmony memory size (HMS), harmony memory considering rate (HMCR), pitch adjusting rate (PAR), maximum improvisation (MI), and fret width (FW).

HMS is the number of solution vectors simultaneously handled in the algo-rithm; HMCR is the rate (0 ≤ HMCR ≤ 1) where HS picks one value randomly from musician’s memory. Thus, (1-HMCR) is the rate where HS picks one value randomly from total value range; PAR (0 ≤ RAR ≤ 1) is the rate where HS tweaks the value which was originally picked from memory. Thus, (1-PAR) is the rate where HS keeps the original value obtained from memory; MI is the number of it-erations. HS improvises one harmony (= vector) each iteration; and FW is arbi-trary length only for continuous variable, which was formerly called as bandwidth (BW). For more information of the term, a fret is the metallic ridge on the neck of a string instrument (such as guitar), which divides the neck into fixed segments (see Figure 2), and each fret represents one semitone. In the context of the HS al-gorithm, frets mean arbitrary points which divide the total value range into fixed segments, and fret width (FW) is the length between two neighboring frets. Uni-form FW is normally used in HS.

Originally fixed parameter values were used. However, some researchers have proposed changeable parameter values. Mahdavi et al. [4] suggested that PAR in-crease linearly and FW decrease exponentially with iterations:

( )MI

IPARPARPARIPAR minmaxmin ×−+=)( (5)

⎥⎥⎦

⎢⎢⎣

⎡⎟⎟⎠

⎞⎜⎜⎝

⎛=

MI

I

FW

FWFWIFW

max

minmax lnexp)( (6)

Page 12: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

State-of-the-Art in the Structure of Harmony Search Algorithm 5

Fig. 2 Frets on the Neck of a Guitar

Mukhopadhyay et al. [5] suggested that FW be the standard deviation of the current population when HMCR is close to 1.

)var()()( iiIFW xx == σ (7)

Geem [6] tabulated fixed parameter values, such as number of variables, HMS, HMCR, PAR, and MI, after surveying various literatures. FW normally ranges from 1% to 10% of total value range.

Furthermore, some researchers have proposed adaptive parameter theories that enable HS to automatically have best parameter values at each iteration [3, 7].

2.3 Random Tuning for Memory Initialization

After problem is formulated and the parameter values were set properly, random tuning process is performed.

In an orchestra concert, after oboe plays the note A (usually A440), other in-struments randomly play any pitches out of playable ranges. Likewise, the HS algorithm initially improvises many random harmonies. The number of random harmonies should be at least HMS. However, the number can be more than HMS, such as twice or three times as many as HMS [8]. Then, top-HMS harmonies are selected as starting vectors.

Musician’s harmony memory (HM) can be considered as a matrix:

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

)(

)(

)(2

1

21

222

21

112

11

HMSHMSn

HMSHMS

n

n

f

f

f

xxx

xxx

xxx

x

x

x

HM (8)

Page 13: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

6 Z.W. Geem

Previously, the objective function values were sorted ( )( 1xf ≤ )( 2xf

≤ … ≤ )( HMSf x ) in HM, but current structure does not require it any more.

2.4 Harmony Improvization

In Jazz improvisation, a musician plays a note by randomly selecting it from total playable range (see Figure 3), from musician’s memory (see Figure 4), or by tweaking the note obtained from musician’s memory (see Figure 5). Likewise, the HS algorithm improvises a value by choosing it from total value range or from HM, or tweaking the value which was originally chosen from HM.

Fig. 3 Total Playable Range of a Music Instrument

Fig. 4 Set of Good Notes in Musician’s Memory

Fig. 5 Tweaking the Note Chosen from Musician’s Memory

Random Selection: When HS determines the value Newix for the new harmony

),,( 1Newn

NewNew xx …=x , it randomly picks any value from total value range

( )}(,),1({ iii Kxx … or Uii

Li xxx ≤≤ ) with probability of (1-HMCR). Random se-

lection is also used for previous memory initialization.

Page 14: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

State-of-the-Art in the Structure of Harmony Search Algorithm 7

Memory Consideration: When HS determines the value Newix , it randomly picks

any value jix from HM = },,{ 1 HMS

ii xx … with probability of HMCR. The index j

can be calculated using uniform distribution )1,0(U :

1))1,0(int( +⋅← HMSUj (9)

However, we may use different distributions. For example, if we use 2)]1,0([U ,

HS chooses lower j more. If the objective function values are sorted by j , HS

will behave similar to particle swarm algorithm.

Pitch Adjustment: After the value Newix is randomly picked from HM in the

above memory consideration process, it can be further adjusted into neighbouring values by adding certain amount to the value, with probability of PAR. For dis-

crete variable, if Newii xkx =)( , the pitch-adjusted value becomes )( mkxi + where

}1,1{−∈m normally; and for continuous variable, the pitch-adjusted value be-

comes ∆+Newix where )()1,0( iFWU ⋅=∆ normally.

The above-mentioned three basic operations (random selection, memory con-sideration and pitch adjustment) can be expressed as follows:

⎪⎪⎪

⎪⎪⎪

⋅⎩⎨⎧

∈∆+∈+

−⋅=∈

−⎩⎨⎧

∈∈

PARHMCRxx

kxmkxPARHMCRxxxx

HMCRxxx

Kxkxxx

x

ii

ii

HMSiiii

Upperi

Lowerii

iiiii

Newi

w.p. if

)(if)()1(w.p.}...,,,{

)1(w.p.],[

)}(),...,(),...,1({

21

HM

HMHM (10)

Especially for discrete variables, the HS algorithm has the following stochastic partial derivative which consists of three terms such as random selection, memory consideration and pitch adjustment [1]:

( )PARHMCR

HMS

mkxnPARHMCR

HMS

kxnHMCR

Kx

f ii

ii

)()1(

))(()1(

1 −+−+−=

∂∂

(11)

Also, the HS algorithm can consider the relationship among decision variables using ensemble consideration just as there exists stronger relationship among spe-

cific musicians (see Figure 6). The value Newix can be determined based on New

jx

if the two has the strongest relationship [9]:

[ ]{ }2),(maxwhere)( jiji

Newj

Newi Corrxfnx xx

≠← (12)

Page 15: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

8 Z.W. Geem

Fig. 6 Relationship between Specific Musicians

If the newly improvised harmony Newx violates any constraint, HS abandons it or still keeps it by adding penalty to the objective function value just like musi-cians sometimes still accept rule-violated harmony (see Figure 7).

Fig. 7 Rule-Violated Harmony (Parallel Fifth)

2.5 Memory Update

If the new harmony Newx is better, in terms of objective function value, than the worst harmony in HM, the new harmony is included in HM and the worst har-mony is excluded from HM:

HMxHMx ∉∧∈ WorstNew (13)

Page 16: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

State-of-the-Art in the Structure of Harmony Search Algorithm 9

However, for the diversity of harmonies in HM, other harmonies (in terms of least-similarity) can be considered. Also, maximum number of identical harmo-nies in HM can be considered in order to prevent premature HM.

If the new harmony Newx is the best one when compared with every harmony in HM, the new harmony can consider an additional process named accidentaling. In music, an accidental is a note whose pitch is not a member of a scale and the accidental sign raises (#) or lowers (b) the following note from its normal pitch as shown in Figure 8. Likewise, HS can further pitch-adjust every note of the new harmony if it is the ever-best harmony, which may find an even better solution:

nix

mkxx

i

iNewi ,,1,

var.continuousfor

var.discretefor )(…=

⎩⎨⎧

∆±±

← (14)

Fig. 8 Accidental for the Note Sol

2.6 Performing Termination

If HS satisfies termination criteria (for example, reaching MI), the computation is terminated. Otherwise, HS improvises another new harmony again.

2.7 Cadenza

Cadenza is a musical passage occurring at the end of a movement. In the context of the HS algorithm, cadenza can be referred to a process occurring at the end of the HS computing. In this process, HS returns the best harmony ever found and stored in HM.

3 Conclusions

This chapter arranged the up-to-date structure of the HS algorithm. Those, who are interested in applying the algorithm to their own optimization problems, may cus-tomize the structure into their problems.

The HS algorithm is still growing. The author hopes other researchers to sug-gest new ideas to make better shape of the algorithm structure.

Page 17: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

10 Z.W. Geem

References

1. Geem, Z.W.: Novel derivative of harmony search algorithm for discrete design vari-ables. Applied Mathematics and Computation 199, 223–230 (2008)

2. Geem, Z.W.: Music-inspired harmony search algorithm: theory and applications. Springer, Berlin (2009)

3. Geem, Z.W.: Harmony search algorithms for structural design optimization. Springer, Berlin (2009)

4. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

5. Mukhopadhyay, A., Roy, A., Das, S., Das, S., Abraham, A.: Population-variance and explorative power of harmony search: an analysis. In: Proceedings of 3rd IEEE Interna-tional Conference on Digital Information Management (ICDIM 2008), pp. 13–16 (2008)

6. Geem, Z.W.: Optimal cost design of water distribution networks using harmony search. Engineering Optimization 38, 259–280 (2006)

7. Wang, C.M., Huang, Y.F.: Self-adaptive harmony search algorithm for optimization. Expert Systems with Applications (2009), doi:10.1016/j.eswa.2009.09.008

8. Degertekin, S.: Optimum design of steel frames using harmony search algorithm. Struc-tural and Multidisciplinary Optimization 36, 393–401 (2008)

9. Geem, Z.W.: Improved harmony search from ensemble of music players. In: Gabrys, B., Howlett, R.J., Jain, L.C. (eds.) KES 2006. LNCS (LNAI), vol. 4251, pp. 86–93. Springer, Heidelberg (2006)

Page 18: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 11–22. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Harmony Search Optimization Algorithm: Application to a Reconfigurable Mobile Robot Prototype

He Xu1, X.Z. Gao2, Tong Wang3, and Kai Xue

Abstract. The terrain of the mobile robot provides the only and powerful thrust. Therefore, the optimal prototype design with respect to the terrain is important for the robot in the sandlot or soft soiled environments. In this chapter, a Harmony Search Multi-Objective Optimization (HSMOO) with constraints is proposed to the design of a reconfigurable mobile robot with respect to the terramechanics, and the optimal configuration prototype is then obtained. The actual condition shows that in the process of mobile robot design and manufacture, the HSMOO is effective to the issue of the mobile robot reconfiguration.

1 Introduction

One of the most important requirements for the mission-oriented mobile robot is to be adaptive to different missions, such as various payloads, terrains, and stability margins. Reconfiguration is a necessary solution for the mobile robot to handle these difficulties. In the past decades, there are several representative resolutions. The Sojourner that was landed in Mars used the rocker-bogie locomotion with deploy and stow state [1], the mini rover Go-For had an active wheel-legged locomotion with reconfigurable postures [2-3], the Nano Rover utilized posable-truct chassis with different prototypes toward different terrains and mission conditions [4], and the Nomad made by the CMU maneuvered with diversified prototypes by the transformed chassis [5]. The rover SMC had the parent and daughter rovers [6]. A retractable chassis had the ability of changing He Xu and Kai Xue College of Mechanics and Electrics Engineering, Harbin Engineering University, Harbin 150001, China E-mail: [email protected], [email protected]

X.Z. Gao Department of Electrical Engineering, Helsinki University of Technology, Otakaari 5A, FIN-02150 Espoo, Finland E-mail: [email protected]

Tong Wang College of Information and Communication, Harbin Engineering University, Harbin 150001, China E-mail: [email protected]

Page 19: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

12 H. Xu et al.

the chassis length [7]. The in-wheel propulsion of a desert-traversing vehicle was studied with respect to the terrain [8], and a novel wheel with an unexpectedly large steering resistance was developed for simulating the features of camera feet [9]. A reconfigurable wheeled mobile robot was also developed with alternative sizes and different trafficability metrics to adapt to uneven terrain [10]. However, its parameters were not optimized.

This paper is organized as follows. Details of the reconfigurable prototypes of the mobile robot are introduced in Section 2. The mass modeling of the robot is presented in Section 3. The stability model of the reconfigurable mobile robot is rendered in Section 4. The wheel resistance based on the terramechanics is investigated in Section 5. An emerging optimization method, namely Harmony Search (HS), is presented in Section 6. The optimal design of the reconfigurable prototype based on HSMOO with constraints is discussed in Section 7. Finally, some remarks and conclusions are drawn in Section 8.

2 Mission-Oriented Mobile Robot and Desired Prototypes

The factors involved in the design process and characters of the aforementioned robot are shown in Fig. 1. Since there are too many factors, a synthesis and trade-off design is needed in terms of the robot’s trafficability, stability, maneuver ability, etc. The wheels of the robot can be adjusted around two pivots of the wheel arms, and this structure makes the wheels generate the caster and camber similar to the ones in an automobile, and the aligning force is generated to guarantee the straight motion ability of the wheels.

The robot’s wheelbase, wheel stance, clearance, caster, camber, longitudinal stability margin, and latitudinal stability margins are all adjustable, due to the

reconfigurable variables: T

, , , , , , ,f f b b w wl h d bα β α β⎡ ⎤= ⎣ ⎦x , where this component

consists of the adjustable rocker length l, the rocker height h, the front wheel caster & camber ,f fα β , the rear wheel caster & camber ,b bα β , and the wheel

diameter & width ,w wd b .

3 Mass Model of Reconfigurable Mobile Robot

The mass distribution of a mobile robot is the most important factor to ensure lower cost, high trafficability, etc. The scopes of the parameters of the wheel have been determined by using the ANSYS in terms of the structure strength and stability, as illustrated in Fig. 2. From the Pro-E model of the wheel, the mass of our robot is:

4( )w ar st boxm m m m m= + + + , (1)

where wm is the mass of the wheel, arm is the rocker mass, stm is the mass of the

steering mechanism, and boxm is the mass of the robot body.

Page 20: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Harmony Search Optimization Algorithm 13

Fig. 1 Diagram of mission analysis, conceptual design, modeling, optimization, and manu-facture of a reconfigurable mobile robot prototype

Page 21: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

14 H. Xu et al.

Fig. 2 Wheel stress distribution

4 Model of Stability of Reconfigurable Mobile Robot

The isometric view of the prototype of the mobile robot with coordinates is shown in Fig. 3.

Fig. 3 Robot prototype in 3-D coordinates

Page 22: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Harmony Search Optimization Algorithm 15

Coordinate ( 1 1 1X Y Z− − ) denotes the front right wheel, axis 1X , 1Y and 1Z are

along the longitudinal, transverse, and latitudinal respectively. Similarly, ( 2 2 2X Y Z− − ), ( 3 3 3X Y Z− − ), and ( 4 4 4X Y Z− − ) represent the coordinates for

front left wheel, rear right wheel, and rear left wheel, respectively. The meanings of these symbols are depicted in the above figures. More relevant details are given in literature [11]. From Fig.2 and Fig.3, we have calculation for the margin of robot stability.

4.1 Longitudinal Stability Margin

The following condition is assumed to be satisfied: (L/2Hcog) > µlg, and (W/2Hcog) > µlt,

where µlg and µlt represent the longitudinal and later attachment coefficients,

respectively. L is the equivalent wheelbase. Hcog is the height of the robot gravity

centre. The longitudinal stability margin of the robot is:

min arctan ,arctanf blg

cog cog

L L

H Hφ

⎛ ⎞= ⎜ ⎟⎜ ⎟

⎝ ⎠, (2)

where fL is the longitudinal front equivalent supporting length of the robot, bL is

the longitudinal rear equivalent supporting length of the robot, and cogH is the

height of the center of gravity of the robot respectively.

4.2 Lateral Stability Margin

The lateral crosswise stability margin is given as follows:

arctan(0.5 )= eglt

cog

W

Hφ . (3)

5 Wheel Resistance Based on Terramechanics

For our optimal design of the robot prototype, the motion of the mobile robot can be analyzed with the robot of rigid wheels rolling into the inclined soft terrain. The static stability is then determined for the worst case where a maximum acceleration vector is added as the transformation to the dynamic circumstance. Assume that the weight of the robot is supported by the two rear wheels, i.e., a 1/2 model of robot is used with the threshold of stability. This threshold is considered as the point, where the center of gravity of the machine crosses above the rear wheels’ point of contact. Fig.4 shows the relations of the inertia force, motion resistances, and mobile robot motion, etc.

Page 23: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

16 H. Xu et al.

Fig. 4 Analysis of resistances of robot on sandy slope in 1/2 model

When robot climbs a sandy slope, the torque due to resistive forces is:

( )2

= + + + + wdrw a c b r g

dT F R R R R (4)

where Fa denotes the inertia force; Rc denotes the soil compaction resistance; Rb denotes the bulldozing resistance; Rr denotes the rolling resistance; Rg denotes the gravitational resistance; and dw is the diameter of the rigid wheel.

6 Harmony Search (HS) Method

The Harmony Search (HS) method is an emerging meta-heuristic optimization algorithm, which is inspired by the underlying principles of the musicians’ improvisation of the harmony [12]. When the musicians compose harmony, they usually try various possible combinations of the musical pitches stored in their memory. Such an efficient search for a perfect state of harmony is analogous to the procedure for finding the optimal solutions to engineering problems. Table 1 presents the comparison between the harmony improvisation and optimization. Fig.5 shows analogy and flowchart of the basic HS method.

Page 24: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Harmony Search Optimization Algorithm 17

Fig. 5 Analogy and flowchart of basic HS method

Table 1 Comparison between harmony improvisation and optimization

Comparison factors Harmony improvisation Optimization

Targets

Best states

Components

Process units

Aesthetic standard

Fantastic harmony

Pitches of instruments

Each practice

Objective function

Global optimum

Values of variables

Each iteration

Page 25: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

18 H. Xu et al.

● Step 1. Initialize the HS Memory (HM). The HM consists of a number of randomly generated solutions to the optimization problems to be solved. For an n-dimension problem, an HM with a size of N can be represented as follows:

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

N

n

NN

n

n

xxx

xxx

xxx

,,,

,,,

,,,

HM

21

222

21

112

11

, (5)

where [ ]i

n

ii xxx ,,, 21 ( Ni ,,2,1= ) is a candidate solution. Note that the HM

stores the past search experiences, and plays an important role in the optimization performance of the HS method.

● Step 2. Improvise a new solution [ ]nxxx ′′′ ,,, 21 from the HM. Each component

of this solution, jx′ , is obtained based on the Harmony Memory Considering

Rate (HMCR). The HMCR is defined as the probability of selecting a component from the HM, and (1-HMCR) is, therefore, the probability of generating it randomly. If jx′ comes from the HM, it is chosen from the thj

dimension of a random HM member, and it can be further mutated depending on the Pitching Adjust Rate (PAR). The PAR determines the probability of a candidate from the HM to be mutated. The improvisation of [ ]nxxx ′′′ ,,, 21 is

similar to the production of offspring in the Genetic Algorithms (GA) with the mutation and crossover operations. However, the GA usually create new chromosomes using only one (mutation) or two (crossover) existing ones, while the generation of new solutions in the HS method makes full use of all the HM members.

● Step 3. Update the HM. The new solution from Step 2 is evaluated. If it yields

a better fitness than that of the worst member in the HM, it will replace that one. Otherwise, it is eliminated.

● Step 4. Repeat Step 2 to Step 3 until a termination criterion is met.

Similar to the GA, the HS method is a random search technique. It does not

need any prior domain knowledge beforehand, such as the gradient information of the objective functions. Nevertheless, different from those population-based approaches, it utilizes only a single search memory to evolve. Hence, the HS method imposes few mathematical requirements, and has the distinguishing advantage of computation simplicity. On the other hand, it occupies some inherent drawbacks, e.g., weak local search ability. Mahdavi et al. propose a modified HS method by using an adaptive PAR to enhance its optimization accuracy as well as speed up the convergence [13]. To summarize, the features of multi-candidate consideration and correlation among the variables contribute to the flexibility of

Page 26: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Harmony Search Optimization Algorithm 19

the HS method, thus making it well suited for the constrained and multi-objective optimal design problems [14]. During the recent years, it has been successfully applied in the areas of function optimization, mechanical structure design, and pipe network optimization.

7 Optimal Design of Reconfigurable Prototype of Mobile Robot

The Multi-Objective Optimization (MOO) of the reconfigurable mobile robot means, under certain constraints such as clearance, obtaining the optimal reconfiguration variables fα , bα , fβ , bβ , l , h , wd , and wb in order to

minimize the objective function F( )x , which can be formulated as

1 2 3min max F( )={ , , }

s.t. G( ) ;

⎧⎪⎨

≤ ≤ ≤⎪⎩

x

x 0 l x Ux f

b b

f f f, (6)

where T

, , , , , , ,f f b b w wl h d bα β α β⎡ ⎤= ⎣ ⎦x is the optimal variable vector, ,l Ub b are

the vectors with the variable scope, and G( )x gives the constraints of the linear

equalities and inequalities. To put it into more details, the first objective 1f

concerns the stability of our mobile robot, which is the first factor to ensure the trafficability. From (2) and (3), there is:

1 1 2/ /lg ltf w wφ φ= + , (7)

where 1w and 2w are two given weights. We have 1 0,w ≥ 2 0,w ≥ 1 2 1w w+ = .

The second objective 2f concerns the resistance torque of the rear propulsive

wheel to ensure the traction of the mobile robot. From (4), there is:

2 drwf T= . (8)

The third objective 3f concerns the mass of the robot. From (2), there is:

3f m= . (9)

Obviously, this is a typical MOO problem, and the ranges of the design variables are as follows:

0.52 0.658; 0.103 0.036; 12 20; 12 28;

28 12; 12 28; 0.076 0.3; 0.04 0.2;

≤ ≤ − ≤ ≤ − ≤ ≤ − ≤ ≤

− ≤ ≤ − ≤ ≤ ≤ ≤ ≤ ≤f f

b b w w

l h

d b

α βα β

The constraints due to the stability are 0− ≤lgθ φ , and the constraints due to

the clearance must ensure 0 0− ≤c cH H .

Page 27: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

20 H. Xu et al.

The parameters of the terramechanics are given in Table 2.

Table 2 Parameters of Terramechanics

Item (Unit) Value Exponent of soil deformation n

Cohesion of soil c (kPa) Angle of internal friction of the soil φ (°)

Velocity (m/s) cohesive coefficient ck (kN/mn+1)

Frictional module of soil deformation kφ

Coefficient of rolling resistance rf (°)

1.0

3.0

40

10

850

0.05

We employ the HSMOO with constraints method to deal with the above Multi -

Objective Optimization design of the configuration of the mobile robot. More precisely, two separate HMs are used in the HS method: one is for the evolution of the harmony members, and the other is considered as an external repository storing the Pareto optimal solutions that have been found. The Pareto optimality is used as the ranking criterion for sorting the members in the first HM. If a new solution candidate is better than the worst HM member, it will be replaced with this new solution. At each iteration step, all the non-Pareto-dominated HM members in the first HM are migrated to the second HM. In the simulations, a total of five Pareto optimal solutions can be obtained in our HS method as given in Table 3.

Table 3 Optimal configurations of mobile robot prototype obtained by HS method

Item l h fα fβ

bα bβ

wd wb

1f 2f 3f

1

2

3

4

5

0.5856

0.5678

0.5339

0.5519

0.5392

-0.0931

-0.0962

-0.0903

-0.0676

-0.0748

-9.1216

-11.4766

-11.5635

10.1818

-5.6409

26.4915

1.1594

3.1792

14.8644

12.1517

-23.5787

-15.2913

-13.6655

3.8979

-17.1125

11.3027

17.0498

3.6762

5.2018

-4.0474

0.0995

0.2054

0.2035

0.0880

0.0794

0.1819

0.0798

0.0542

0.1601

0.1595

53.5208

46.9499

45.8246

56.1625

58.4153

11.1125

18.4725

19.8231

10.9106

10.5465

35.18

35.18

35.18

35.18

35.18

Note that the optimal 3f is always 35.1800. The approximated Pareto front of

this MOO problem is illustrated in Fig. 6. Compared with the conventional Minimum-Maximum method, the HS-based approach can provide us with multiple Pareto optimal solutions as in Table 3. Therefore, an appropriate compromise needs to be made when choosing the best prototype. As an example, the optimal solution is F(xopt) = {46.2810°, 17.5091Nm, 35.1800kg}. Apparently,

we can get the optimal x : 0.52ml = , 0.103mh = − , 12fα = − , 12fβ = − ,

28bα = − , 12bβ = − , 0.2mwd = , and 0.1mwb = .

Page 28: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Harmony Search Optimization Algorithm 21

45 50 55 6010

11

12

13

14

15

16

17

18

19

20

Stability f1 (degree)

San

dlot

Res

ista

nce

Tor

que

f2 (

N.m

)

Fig. 6 Pareto optima of mobile robot configuration acquired by HSMOO

8 Summary and Conclusions

In this chapter, the design synthesis frame work of a reconfigurable mobile robot traversing over the sandlot or sandy terrain is firstly presented in terms of the mission requirements, terramechanics and the performance of mobile robot. Then the quantitative model of the robot stability, robot mass and wheel resistance torque was built with respect to Pro-E model, terramechanics and the robot performance constraints such as the stability and clearance. A HS-based MOO technique is next employed to obtain the optimal reconfigurable robot prototype. The result showed that optimal prototype by HSMOO is effective.

Acknowledgements

The authors would like to thank all the collaborators in this joint research project. This work was supported by the National Science Foundation of China under Grant 60775060, the Foundation Research Fund of Harbin Engineering University under Grant HEUFT07027, Natural Science Foundation of the Heilongjiang Province of China under Grant F200801, and Specialized Research Fund for the Doctoral Program of Higher Education under Grant 200802171053. X. Z. Gao’s work was also funded by the Academy of Finland under Grant 214144.

References

1. Apostolopoulos, D.: Systematic configuration of robotic locomotion. Technical Report CMU-RI-TR-96-30, The Robotics Institute, Carnegie Mellon University, Pittsburgh, PA (1996)

Page 29: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

22 H. Xu et al.

2. Jet Propulsion Laboratory. Mars Pathfinder. News Online (1998), http://mars.jpl.nasa.gov/MPF/index1.html (accessed 8 April 1998)

3. Jet Propulsion Laboratory. Mars Exploration Program. News Online (2000), http://mpfwww.jpl.nasa.gov/ (accessed November 2000)

4. Sreenivasan, S.V., Wilcox, B.H.: Stability and traction control of an actively actuated micro- rover. Journal of Robotic Systems 11, 487–502 (1994)

5. Kubota, T., Kuroda, Y., Kunii, Y.: Micro planetary rover Micro5. In: 5th International Symposium on Artificial Intelligence, Robotics and Automation in Space (ISAIRAS 1999), Noordwijk, Netherlands, June 1-3 (1999)

6. Shigeo, H.: Super-mechano-colony and SMC rover with detachable wheel units. In: COE Workshop 1999, Tokyo, Japan, August 20-24 (1999)

7. Apostolopoulos, D.: Analytical configuration of wheeled robotic locomotion. Technical Report CMU-RI-TR-01-08, The Robotics Institute, Carnegie Mellon University, Pittsburgh, PA (2001)

8. Zhuang, J.D.: Biomimetics wheel simulating a camera feet. In: Zhuang, J.D. (ed.) dvanced Technology of Tire. Beijing Machine Industry Press, Beijing (2001)

9. Chen, Z.: Research of a compound walking wheel having retractile laminas with application to lunar rover. Master thesis, Jilin University (2007)

10. Fu, Y., Xu, H., Ma, Y.: A navigation robot with reconfigurable chassis and bionic wheel. In: IEEE International Conference on Robotics and Biomimetics (ROBIO 2004), Shenyang, China, August 22-25 (2004)

11. Xu, H., Tan, D.W., Zhang, Z.Y.: Optimization of mobile robot based on projection method and harmony search. In: IEEE International Conference on Robotics and Biomimetics (ROBIO 2004), Bangkok, Thailand, February 21-26 (2008)

12. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001)

13. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

14. Gao, X.Z., Wang, X., Ovaska, S.J.: Harmony search methods for multi-modal and constrained optimization. In: Geem, Z.W. (ed.) Music-Inspired Harmony Search Algorithms. Springer, Berlin (2009)

Page 30: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 23–36. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms

Panwadee Tangpattanakul, Anupap Meesomboon, and Pramin Artrit1

Abstract. This research proposes a method of obtaining an optimal trajectory of robot manipulator by using Harmony Search (HS). Despite the fact that the Se-quential Quadratic Programming (SQP) is popular as a solving method for opti-mum trajectory problems, SQP needs a suitable initial value. The HS algorithm does however not require such process of setting initial value. Two results are compared using minimum traveling time as the objective function since time is the vital key for productivity particularly in the industrial sector. The state variables of 6-DOFs robot arm are simulated and the kinematics constraints are also consid-ered. The results show that HS obtains the better solution than SQP method with the unsuitable initial value. Moreover, the hybrid HS and SQP method, Hybrid Harmony Search Algorithm (HHSA) is effective and acceptable for solving the optimal trajectory problem without its initial value finding process. Therefore, the important role of HS is that it can be applied to assist SQP to converge to the global optimum.

1 Introduction

In a robot manipulator application, a trajectory refers to a time history of position, velocity, and acceleration for each robot’s joint. At the present, many researches are developing algorithms for obtaining the optimal trajectory planning. Their works are different in three aspects: I) the objective function of the optimization problem, II) the trajectory form, and III) the optimization technique.

The first aspect considers the objective function of the optimization problem consisting of: traveling-time [1], energy [2], and jerk minimization. The latest ob-jective function requires for smoothing trajectory and reducing damage on actua-tors [3]. The second one is the trajectory forming in which certain points must be achieved. Thus, the trajectory is an interpolated function whose polynomial [4] or spline functions are commonly used. However, the polynomial function may occur the Runge’s phenomenon if the number of specified points is large because the high order polynomial leads to obtain the oscillation and overshoot. Hence, the spline function is chosen because it can avoid the Runge’s phenomenon. The last Panwadee Tangpattanakul, Anupap Meesomboon, and Pramin Artrit Department of Electrical Engineering, Faculty of Engineering, Khon Kaen University, Khon Kaen, Thailand E-mail: [email protected], {anupap,pramin}@kku.ac.th

Page 31: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

24 P. Tangpattanakul, A. Meesomboon, and P. Artrit

aspect is the optimization technique for solving the constrained optimization prob-lem. There are many precedent researches developing in this problem: the DOT (Design Optimization Tool) program that combines the Lagrange Multiplier method, Golden Section, and Polynomial One-Dimension Search method [5]; Genetic Algorithm (GA) and Simulated Annealing (SA) [4]; Sequential Weight Increasing Factor Technique (SWIFT) and GA [6]; and Sequential Quadratic Pro-gramming (SQP) [7-9] are used for solving the optimization technique. In Chet-tibi’s work [7] suggests that SQP may obtain the local minimum. To converge the global minimum, changing initial value is thus needed. The SQP method and ini-tial value finding algorithm are used in Gasparetto and Zonotto’s works [8-9]. The jerk minimization is applied when the objective function of the optimi-zation problem and the traveling time are fixed. Their results show a major draw-back of SQP technique as it only obtains a global minimum if the suitable initial value is set.

Fig. 1 The 6-DOFs robot manipulator

The Harmony Search (HS) and Hybrid Harmony Search Algorithm with SQP

(HHSA) which do not require the initial value are employed for solving the opti-mization problem of the minimum time trajectory in this work. The minimum-time simulations of the 6-DOFs robot manipulator trajectory are illustrated, as seen in Fig. 1. The kinematics constraints (each joint velocity, acceleration, and jerk limitations) are also considered. Two types of spline functions, a cubic spline and a 5th degree B-spline, are employed to cover various trajectory forms. The cu-bic spline is used for a simple trajectory which has continuity in position, velocity, and acceleration while the 5th degree B-spline is a more complex trajectory where jerk pattern smoothness is also considered. The HS algorithm has the advantage that it does not require the suitable initial value and it is a global optimum search algorithm [10]. However, SQP method has the exactness and speed for converging to the local optimum. The SQP and HS results are presented and they show their advantages. Hence, the HHSA is a good alterative to be chosen to apply in this area because it has the strengths of both HS algorithm and SQP method.

Page 32: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 25

This work is organized as follows. In Section 2, the research methodologies are explained. They consist of the formulation of spline trajectory, the constrained opti-mization problem and constraints. Section 3 describes the Harmony Search Algo-rithm in term of the optimization process. In Section 4, the simulation model of 6-DOFs robot arm minimum time trajectory is our test system. The results between the best solutions which are obtained by SQP and HS are compared and the hybrid method is also applied to this simulation. Finally, the work is concluded in Section 5.

2 Research Methodologies

2.1 Formulation of the Trajectory Clamped with Splines

The cubic spline and the 5th degree B-spline are employed to the robot joint trajec-tories forms. They clamp a set of specified robot joint position values qj,i, where j and i represent a joint and a knot sequences, respectively. The knot is a set of posi-tion points that one joint moves from the initial position (knot 1) to the terminal position (knot n) and the joint arrives its series of knot at the time t1, t2,…, ti,…, tn, respectively. n is the number of via-points from the initial to the terminal. The joint position is also called a joint vector. Let hi (= ti+1 - ti) be the interval time [ti, ti+1]. In this section, the cubic spline and the 5th degree B-spline formulations are shown.

• Cubic spline formulation The cubic spline is a piecewise 3rd degree polynomial function. The velocities

and accelerations of the initial and terminal conditions (v1, vn, a1, and an) are speci-fied to be zero. These conditions cause two equations of the cubic spline algorithm becoming zero and the path pattern cannot be solved. Therefore, two extra knots (position values at time t2 and tn-1) are added and their position values are not specified. Let Qj,i(ti) be the cubic polynomial for the j-th joint in the interval time [ti, ti+1]. The second derivative of Qj,i(t) is a linear interpolation, as seen in Fig. 2.

( )iij tQ ,

( )1, +iij tQ

( )tQ

1+ititt

ih

Fig. 2 Second derivative of cubic spline on time interval [ti, t

i+1]

Page 33: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

26 P. Tangpattanakul, A. Meesomboon, and P. Artrit

The second derivative of cubic spline can be written as [9]:

( ) ( ) ( ) .1,,1;1,,1

, −=−+−= ++ nitQ

h

tttQ

h

tttQ iij

i

iiij

i

iij … (1)

Integrating equation (1) for the given points Qj,i(ti) = qj,i and Qj,i(ti+1) = qj,i+1, the following interpolation functions are obtained:

( ) ( ) ( ) ( ) ( )

( ) ( )⎥⎥⎦

⎢⎢⎣

⎡−−

⎥⎥⎦

⎢⎢⎣

⎡−+

−+−−=

++

++

66

22

,,1,1,

21,21

,,

iiji

i

jiiiji

i

ij

ii

iiji

i

iijij

tQh

h

qtQh

h

q

tth

tQtt

h

tQtQ

(2)

and

( ) ( ) ( ) ( ) ( )

( ) ( )

( ) ( )tttQh

h

q

tttQh

h

q

tth

tQtt

h

tQtQ

iiiji

i

ji

iiiji

i

ij

ii

iiji

i

iijij

−⎥⎥⎦

⎢⎢⎣

⎡−+

−⎥⎥⎦

⎢⎢⎣

⎡−+

−+−=

+

++

++

1,,

1,1,

31,31

,,

6

6

66

(3)

Using the continuity conditions on velocities and accelerations, a system of n-2 linear equations solving for n-2 unknowns ( ) 1,,3,2,, −= nitQ iij … is obtained

as [5];

( ) ( ) ( )[ ] BA =−−T

nnjjj tQtQtQ 11,33,22, (4)

In (4), the matrix A is non-singular matrix and entries of the matrix B are changed for each joint. Then, the extra knots position values can obtain from

( )22,

21

1

21

111,2, 63tQ

ha

hvhqq jjj +++= (5)

( ) .63 11,

21

21

1,1, −−−−

−− ++−= nnjn

nn

nnnjnj tQh

ah

vhqq (6)

Each joint of cubic spline trajectories and their derivatives are illustrated in Fig. 3-8.

Page 34: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 27

Fig. 3 Cubic spline trajectory of joint 1 Fig. 4 Cubic spline trajectory of joint 2

Fig. 5 Cubic spline trajectory of joint 3 Fig. 6 Cubic spline trajectory of joint 4

Fig. 7 Cubic spline trajectory of joint 5 Fig. 8 Cubic spline trajectory of joint 6 Where are position patterns (deg),

are velocity patterns (deg/s), are acceleration patterns (deg/s2),

and are jerk patterns (deg/s3).

• 5th degree B-spline formulation

The 5th degree B-spline is an interpolated function which is between the specified knots or via-points. The velocities, accelerations, and jerks of the ini-tial and terminal conditions are specified to be zero. Therefore, two extra knots (position values at time t2 and tn-1) are added and their position values are not

Page 35: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

28 P. Tangpattanakul, A. Meesomboon, and P. Artrit

specified similar to the cubic spline trajectory. Let Ni,p(t) be the pth degree base or blending function and CPQi, CPVi, CPAi, and CPJi are the control points of displacement, velocity, acceleration and jerk, respectively, which are weight co-efficients. From the B-spline property, the nodes Uq1, Uq2,…, Uqm+1 are added for B-spline calculation and m = n+p+1. Where m+1, n+1, p are number of nodes, control points and degree of B-spline, respectively. The 5th degree B-spline trajectory is formulated as;

( ) ( )∑+

=

=1

1,

n

ipii tNCPQtq (7)

where p = 5 and

( ) ( ) ( )

( )⎩⎨⎧ ≤≤

=

−−

+−

−=

+

−++++

++−

+

.;0

;1 10,

1,111

11,,

elsewhere

ttttN

tNtt

tttN

tt

tttN

iii

piipi

pipi

ipi

ipi

The 4th degree function of velocity is obtained as;

( ) ( )∑=

−=n

ipii tNCPVtv

11, (8)

where ( )

.,,2,1

111

ni

CPQCPQUqUq

pCPV ii

ipii

…=

−−

= ++++

The acceleration function is obtained as;

( ) ( )∑−

=−=

1

12,

n

ipii tNCPAta (9)

where ( )

.1,,2,1

11

1

−=

−−−= +

++

ni

CPVCPVUvUv

pCPA ii

ipii

And the jerk function is obtained as;

( ) ( )∑−

=−=

2

13,

n

ipii tNCPJtj (10)

where ( )

.2,,2,1

21

11

−=

−−

−= ++−+

ni

CPACPAUaUa

pCPJ ii

ipii

Where Uq, Uv, and Ua are position, velocity, and acceleration’s nodes as seen in Fig. 9.

Page 36: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 29

Fig. 9 Example of a node sequence where the number of specified knots is 4

The CPVi, CPAi, and CPJi can be derived from CPQi. Therefore, the CPQi val-

ues can be obtained from the equations of the specified velocities, accelerations and jerks of the initial and the terminal conditions and the specified position at via-points in Table 1. A system of n+1 linear equations solving for n+1 unknowns

1,,2,1, += niCPQi … is obtained. These linear equations are;

0,0

0,0

0,0

1

1

1

====

====

====

finalninitial

finalninitial

finalninitial

jCPJjCPJ

aCPAaCPA

vCPVvCPV (11)

and

( )∑+

=

=⋅1

1,,,

n

kijkjikp VPRCPQN τ (12)

where vpi ,,2,1 …= , vp is the number of specified knots in each joint. VPRj,i is

the defined displacement value in j-th joint and i-th knot. Each joint of 5th degree B-spline trajectories and their derivatives are illustrated

in Fig. 10-15. Note that jerk pattern in 5th degree B-spline trajectory is smoother than cubic spline.

Fig. 10 5th degree B-spline trajectory of joint 1 Fig. 11 5th degree B-spline trajectory of joint 2

Page 37: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

30 P. Tangpattanakul, A. Meesomboon, and P. Artrit

Fig. 12 5th degree B-spline trajectory of joint 3 Fig. 13 5th degree B-spline trajectory of joint 4

Fig. 14 5th degree B-spline trajectory of joint 5 Fig. 15 5th degree B-spline trajectory of joint 6 Where are position patterns (deg),

are velocity patterns (deg/s), are acceleration patterns (deg/s2),

and are jerk patterns (deg/s3).

2.2 Constrained Optimization Problem

The important consideration to increase the productivity is traveling time of robot manipulator. Therefore, the minimization of traveling time is here the investigated objective function. It leads to trajectories with large value of the kinematics quan-tities (velocities, accelerations and jerks). They cause to oscillate and overshoot which is difficult to control the position tracking. Moreover, the actuator can be damaged by sudden motion. Thus, the velocities, accelerations, and jerks con-straints must also be considered in the optimization process.

Hence, the objective function and constraints for finding the optimal trajectory planning problem can be formulated as:

( ) ( ) ( ) NjJCtqACtqVCtqtosubject

h

jjjjjj

n

ii

,,2,1;,,

min1

1

…=≤≤≤

∑−

= (13)

Page 38: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 31

where VCj, ACj, and JCj are the velocity, acceleration, and jerk constraints for j-th joint, respectively. N is the number of robot joints. The interval times hi between via-points are computed by the constrained optimization problem (13).

2.3 Constraints Formulation of Spline

• Constraint formulation of cubic spline The velocity constraints of the optimization problem are formulated as the

maximum absolute value of velocities at the extreme points ti or ti+1 or ti* where

( ) 0*,,

* == iijij tQQ in each interval [9]. The velocity constraints become:

( ) ( ){ }

.1,,2,1;,,2,1

;,,max ,*

1,,

−==

≤+

niandNj

VCQtQtQ jijiijiij

…… (14)

The acceleration constraints are formulated from the acceleration linear func-tion and the maximum absolute value exists at ti or ti+1. The acceleration con-straints are

{ } .,,2,1;,,max ,1, NjACQQ jnjj …… =≤ (15)

The jerk constraints are formulated from the rate of change of acceleration.

.1,,2,1;,,2,1;,1, −==≤−+ niandNjJC

h

QQj

i

ijij …… (16)

The equations (14) to (16) are the constraints of the optimization problem in equation (13).

• Constraints formulation of 5th degree B-spline The velocity, acceleration and jerk functions are 4th, 3rd and 2nd degree polyno-

mial, respectively. Their constraints cannot be determined for some points like cu-bic spline. Hence, sampling of some points from their functions is applied in the simulation. In this work, sampling rate is set to 0.01 sec/sample.

3 Harmony Search Algorithm

Harmony Search (HS) is a heuristic optimization algorithm [10]. It has been shown that HS outperforms various optimization methods in many optimization problems [11]. HS mimics the improvisation of music players for searching the better harmony. The HS flowchart is shown in Fig. 16.

The Harmony Search (HS) algorithm has been developed by combining features of others heuristic optimization methods. It preserves the history of past vectors similar to Tabu Search (TS) and ability to vary the adaptation rate as Simulated Annealing (SA). Furthermore, HS manages several vectors simultaneously in the

Page 39: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

32 P. Tangpattanakul, A. Meesomboon, and P. Artrit

process similarly to the Genetic Algorithm (GA). However, the major difference between GA and HS is that HS makes a new vector from all existing vectors and can independently consider each component variable in a vector, while GA utilizes only two of the existing vectors and keep the structure of gene.

Fig. 16 Harmony Search flowchart

4 Simulation Results

The simulation results of cubic spline and 5th degree B-spline trajectories compare two techniques, SQP and HS since SQP becomes more increasingly used in the area of robot trajectory path planning [8-9]. The knot positions (via-points) and kinematics constraints of the joints of 6-DOFs robot manipulator system are shown in Table 1 and 2, respectively.

Page 40: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 33

Table 1 Knot positions of each robot manipulator joint

Joint Point1 (deg)

Point2 (deg)

Point3 (deg)

Point4 (deg)

Point5 (deg)

Point6 (deg)

1 -10 60 20 55

2 20 50 120 35

3 15 100 -10 30

4 150 100 40 10

5 30 110 90 70

6 120

Extra knot

60 100

Extra knot

25

Table 2 Kinematics constraints of each robot manipulator joint

Joint Velocity (deg/s) Acceleration (deg/s2)

Jerk (deg/s3)

1 100 60 60

2 95 60 66

3 100 75 85

4 150 70 70

5 130 90 75

6 110 80 70

• Cubic spline simulation results

For the SQP method, the Gasparetto and Zanotto’s initial value finding algo-rithm is employed for the minimum traveling time trajectory planning. Since the SQP method requires the suitable initial value for solving the optimization prob-lem. The initial vector is H0 = [0.6820 0.6820 1.7651 0.7179 0.7179]. The SQP simulation results (objective function value) when the number of digits is varied are shown in Table 3.

Table 3 The SQP simulation results of cubic spline

Digit’s number of

initial values

Initial values vector

(H0)

Minimum value of the objective function (sec)

0 [ ]11211 8.5310

1 [ ]7.07.08.17.07.0 8.5726

2 [ ]72.072.077.168.068.0 8.5310

3 [ ]718.0718.0765.1682.0682.0 8.5310

4 [ ]7179.07179.07651.16820.06820.0 8.5310

Page 41: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

34 P. Tangpattanakul, A. Meesomboon, and P. Artrit

For the HS method which does not need the initial value, the simulation results are shown in Table 4.

Table 4 The HS simulation results of cubic spline

Number of iterations Minimum value of the objective function (sec)

10,000 8.5718 50,000 8.5607

100,000 8.5586 200,000 8.5577

The cubic spline simulation results show that HS obtains the better solution

than SQP with the unsuitable initial value. Moreover, it can eliminate the initial value finding process [12].

• 5th degree B-spline simulation results For the SQP method, the initial vector is taken from Gasparetto and Zonotto’s

algorithm which is H0 = [1.4138 1.4138 3.6594 1.4883 1.4883]. The SQP simula-tion obtains 8.4935 sec for the minimum traveling time, when the initial value is set suitably.

For the HS method, the simulation results are shown in Table 5.

Table 5 The HS simulation results of 5th degree B-spline

Number of iterations Minimum value of the objective function (sec)

10,000 10.2646 50,000 9.0735

100,000 8.5976 200,000 8.5709

The 5th degree B-spline simulation results show that SQP method with the

proper initial value obtains the better solution. Since the SQP and the HS have different advantages, the hybrid method as Hy-

brid Harmony Search Algorithm (HHSA) is implemented to take the advantages of both techniques.

The HHSA is hybridizing the Harmony Search (HS) algorithm with the Se-quential Quadratic Programming (SQP) [13]. The HS can find near global opti-mum while the SQP is used to speed up local search and has the precision to find the local solution. Thus, the HHSA is an effective method for searching the exact global optimum.

The HHSA has procedures which base on the HS. In each iteration, after it ob-tains the new vector, the SQP method is inserted on this step. The new vector is set to be the initial value for SQP method. Then the SQP solution is compared with the worst objective function value in HM. After that, it follows the HS procedures. In

Page 42: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Optimal Trajectory of Robot Manipulator Using Harmony Search Algorithms 35

last iteration, the best vector in HM is set to be the initial solution of SQP method. In this final step the SQP solution is the result of the optimization problem.

The HHSA simulation results for cubic spline and 5th degree B-spline are shown in Table 6.

Table 6 The HHSA simulation results after 10 iterations

Trajectory forms Minimum value of the objective function (sec)

Cubic spline 8.5310 5th degree B-spline 8.4935

The results of three optimization techniques are compared for cubic spline and

5th degree B-spline trajectories. The simulation results show that if the SQP initial value is not set properly, the SQP obtains the worse solution than the HS. How-ever, the HHSA provides the better. Moreover, HHSA obtains the best solution without the initial value finding process where as SQP method requires.

The results show that HS and HHSA are efficient enough to solve the optimal trajectory problem. It yields the best solution that gives the minimum time trajec-tory and satisfies the kinematics limitation constraints of the optimization problem.

5 Conclusions

The trajectory planning of a 6-DOFs robot manipulator is set as our problem for finding the minimum time trajectory using HS. The cubic spline and 5th degree B-spline are employed to be the trajectory forms because they represent various types of work. The objective function is the minimum traveling time with kine-matics constraints (velocity, acceleration, and jerk limitations). Three optimization techniques (HS, SQP, and HHSA) are compared. The results show that if the ini-tial value for SQP method is not set properly, HS obtains the better solution than SQP. The HHSA results are as good as the SQP with the suitable initial value. The HHSA operates together with HS and SQP advantages. Moreover, HS and HHSA can eliminate the initial value finding process and they can reduce the error that may occur by the unsuitable initial value setting. Therefore, an important conclu-sion to address is that a heuristic algorithm like HS is simple and can be applied together with a conventional optimization algorithm like SQP in order to find a global optimum.

References

1. Piazzi, A., Visioli, A.: A global optimization approach to trajectory planning for indus-trial robots. In: Proceedings of the 1997 IEEE/RSJ International Conference on Intelli-gent Robots and Systems (IROS 1997s), Grenoble, France, September 7-11 (1997)

2. Spangelo, I., Egeland, O.: Generation of energy-optimal trajectories for an autonomous underwater vehicle. In: Proceedings of the 1992 IEEE International Conference on Robotics and Automation, Nice, France, May 12-14 (1992)

Page 43: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

36 P. Tangpattanakul, A. Meesomboon, and P. Artrit

3. Piazzi, A., Visioli, A.: Global minimum-jerk trajectory planning of robot manipulators. IEEE Transactions on Industrial Electronics 47, 140–149 (2000)

4. Garg, D.P., Kumar, M.: Optimization techniques applied to multiple manipulators for path planning and torque minimization. Enginnering Applications of Artificial Intelli-gence 15, 241–252 (2002)

5. Saramago, S.F.P., Steffen Jr., V.: Optimization of the trajectory planning of robot ma-nipulators taking into account the dynamics of the system. Mechanism and Machine Theory 33, 883–894 (1998)

6. Zhu, X., Wang, H., Zhao, M.: Using nonlinear constrained optimization methods to solve manipulators path planning with hybrid genetic algorithms. In: Proceedings of IEEE International Conference on Robotics and Biomimetics (ROBIO), Shatin, Hong Kong, 29 June-3 July (2005)

7. Chettibi, T., Lehtihet, H.E., Haddad, M., et al.: Minimum cost trajectory planning for industrial robots. European Journal of Mechnics A/Solids 23, 703–715 (2004)

8. Gasparetto, A., Zanotto, V.: A new method for smooth trajectory planning of robot manipulators. Mechanism and Machine Theory 42, 455–471 (2007)

9. Gasparetto, A., Zanotto, V.: A technique for time-jerk optimal planning of robot trajec-tories. Robotics and Computer-Integrated Manufacturing 24, 415–426 (2008)

10. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001)

11. Lee, K.S., Geem, Z.W.: A new meta-heuristic algorithm for continuous engineering optimization: harmony search theory and practice. Computer Methods in Applied Me-chanics and Engineering 194, 3902–3933 (2005)

12. Tangpattanakul, P., Artrit, P.: Minimum-Time Trajectory of Robot Manipulator Using Harmony Search Algorithm. In: 6th International Conference on Electrical Engineer-ing/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON 2009), Chonburi, Thailand, May 6-9 (2009)

13. Fesanghary, M., Mahdavi, M., Minary-Jolandan, M., et al.: Hybridizing harmony search algorithm with sequential quadratic programming for engineering optimization problems. Computer Methods in Applied Mechanics and Engineering 197, 3080–3091 (2008)

Page 44: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 37–50. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Visual Tracking Using Harmony Search

Jaco Fourie1, Steven Mills, and Richard Green

Abstract. In this chapter we present a novel method for tracking an arbitrary target through a video sequence using the Harmony Search algorithm called the Harmony Filter. The Harmony Filter models the target using a color histogram and compares potential matches in each video frame using the Bhattacharyya coefficient. Matches are found using the Improved Harmony Search (IHS) algorithm. Experimental re-sults show that the Harmony Filter can robustly track targets in challenging envi-ronments while still maintaining real-time performance. We compare the runtime and accuracy performance of the Harmony Filter with other popular methods used in visual tracking including the particle filter and the Kalman Filter. We show that the Harmony filter performs better in both speed and accuracy than similar systems based on the particle filter and the Unscented Kalman Filter (UKF).

1 Introduction

A visual tracking system is one that can correctly and robustly identify an arbi-trary target’s location across the frames of a video sequence. In general, the target moves from frame to frame and is found at a different position in every frame. The target can also change its appearance between frames due to being obscured by other objects, motion blurring, rotation, and various other effects often encoun-tered in video sequences. This is a challenging problem since it is difficult to pre-dict where the target will appear in the next frame and since targets can only be approximately identified due to their changing appearance. An example of a visual tracking system tracking the trajectory of a ball is shown in Figure 1.

One of the most popular methods used to design visual tracking systems is the Kalman Filter [1, 2]. The Kalman Filter is a statistical recursive filter that can es-timate the state of a linear system from noisy measurements. When the problem cannot be accurately modeled as a linear system, as is often the case in visual tracking, the Kalman Filter can be adapted by using nonlinear approximations. Two examples of adapted Kalman Filters used successfully in visual tracking are the Extended Kalman Filter (EKF) and the Unscented Kalman Filter (UKF) [3]. Jaco Fourie, Steven Mills, and Richard Green Computer Science and Software Engineering, University of Canterbury, Christchurch, New Zealand E-mail: [email protected]

Page 45: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

38 J. Fourie, S. Mills, and R. Green

Fig. 1 An example of a tracking system tracking the trajectory of a ball. The white circles indicate the position of the ball through a series of frames [10].

However, the Kalman Filter models the position of the target and the noise in the system as a Gaussian distribution. This is often an inaccurate assumption and causes the tracking system to lose the target in challenging environments. For this reason more robust algorithms that make no assumptions about the system noise or the target distribution are often preferable.

The particle filter is one such algorithm and has become popular in visual track-ing systems due to its accurate performance in challenging tracking problems [4]. The particle filter is an importance sampling method that models the target’s posi-tion distribution as a point cloud using Monte Carlo sampling. It makes no as-sumptions about the shape of the distribution and can accurately model non-Gaussian distributions. However, the accuracy of the particle filter is dependent on the number of particles used to model the distribution. As more particles are used the accuracy improves but so does the computational costs. The high computa-tional cost of the particle filter often makes it impractical for real-time tracking systems.

An alternate approach that has recently been investigated by several researchers is to use heuristic optimization algorithms to find and track the target. Most of these methods involve the use of a genetic algorithm or the particle swarm algo-rithm [5, 6, 7]. The advantage of these algorithms is that no assumptions are made

Page 46: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 39

about the system noise or the target’s distribution within a frame. As a result the designer is free to model the target and its predicted movement in any way, which gives this approach the potential for increased accuracy in situations where other methods would be constrained to linear, continuous, or differentiable approxima-tions that might not model the target correctly. However, the high computational cost associated with most of these algorithms keep them from being used in many tracking problems where real-time performance is required.

In this chapter we introduce a novel method for visual tracking based on the Harmony Search algorithm called the Harmony Filter. The Harmony Filter treats the visual tracking problem as a frame-by-frame optimization problem that uses the Improved Harmony Search (IHS) algorithm to find the approximated optimal target position at every frame. We show that the Harmony Filter can accurately find the target even when it is poorly modeled for the surrounding environment while still maintaining real-time performance. This chapter is an overview of the Harmony Filter and interested readers are referred to [8] for more technical details.

In the section that follows the design of the Harmony Filter is discussed. The focus will be on the way in which the visual tracking problem can be interpreted as an optimization problem, and the use of Harmony Search to find this optimum. Specific ways that Harmony Search was adapted to improve tracking performance will also be discussed. Section 3 gives some tracking results and compares the Harmony filter’s accuracy and performance with that of the particle filter and the UKF.

2 Design of the Harmony Filter

By interpreting the visual tracking problem as an optimization problem the IHS algorithm can be used to find the optimal target position. We do this by modeling the target as a color histogram and comparing this histogram with candidate histo-grams generated from different regions of the frame. Histograms are compared us-ing the Bhattacharyya coefficient that measures the similarity between histograms and is defined as

,)()(),(1∑

=

=ΒN

i

icitct

where N is the number of bins in the histograms, and t and c are the histograms be-ing compared [9]. This approach of modeling targets as color histograms and comparing them using the Bhattacharyya coefficient has been used successfully by various other researchers and has proven to be robust to many of the appearance changes that targets can undergo in a video sequence [9, 10].

At each frame in the video sequence candidate histograms are generated from possible target locations in the frame. Each candidate histogram is then compared with the histogram originally generated from the target and the one that is closest to the target histogram represents the most likely target position in the current frame.

Page 47: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

40 J. Fourie, S. Mills, and R. Green

The problem to be optimized is then to find the region in the frame that gener-ates the histogram that is most similar to the target histogram. The search space of candidate regions is every pixel position in the frame and can be very large de-pending on the video resolution. The distribution of the evaluation function we are optimizing is generally not Gaussian and is often multi-modal with many local op-tima that make it difficult for traditional optimization algorithms to find the global optimum. The Harmony Search algorithm is therefore an appropriate solution since it makes no assumptions on the search space or target distribution and is fast enough to allow for real-time performance.

2.1 Architecture

The Harmony Filter tracking system consists of two components and is illustrated in Figure 2. The main tracker component, shown on the left, receives a constant image stream that is augmented to indicate the target position and rendered to screen. The user starts the system by choosing a target to track by drawing a box around it. The tracker then generates a reference histogram from the indicated re-gion and stores it for future reference.

The position of the target is approximated in real-time by the second compo-nent that forms the core of the Harmony Filter, the Harmony Search optimizer (HSO). The HSO is initialized by filling the harmony memory (HM) with candi-date solutions based on the approximated position from the previous frame. This ensures quick convergence and maintains real-time performance.

Fig. 2 The Harmony Filter algorithm

Page 48: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 41

2.2 Harmony Search Adapted for Visual Tracking

The HSO is based on the Improved Harmony Search (IHS) algorithm in which the pitch adjustment rate (PAR) and bandwidth (BW) parameters are updated dynami-cally to move the focus from exploration at the start of the search to accurate con-vergence near the end [11]. The IHS algorithm improves the original HS algorithm by decreasing the number of iterations needed for convergence while maintaining high accuracy. It does this with the minimum amount of computational overhead which makes it well-suited to our real-time visual tracking system.

2.2.1 Initialization of the HM

As mentioned before, the HM is initialized based on the previous position of the target. A predicted target position is calculated using a simple motion model that assumes steady velocity of the target between frames. This predicted position is then randomly perturbed by small amounts to create initial candidate solution vec-tors to fill the HM.

For this problem we choose the state solution vector that specifies the target’s location, velocity and scale as

,],,,,[ syxyxxi =

where yx, is the location of the target in pixel coordinates, yx, is the velocity of

the target and s is a scaling parameter that controls the size of the box around the target. The simple motion model used to initialize the HM is defined by

,

2

12

1

1

1

1

1

ytt

xtt

yttt

xttt

ayy

axx

ayyy

axxx

+=+=

++=

++=

+

+

+

+

where yx aa , are randomly generated accelerations in the x and y directions.

Once the HM has been initialized new candidate solutions are improvised using the standard HS algorithm and the HM is updated until convergence to the optimal solution is detected. Since the predicted target position can be calculated from its velocity and previous position, only the yx, and s components are explored dur-

ing the improvisation process. This speeds up the convergence by limiting the search space to only solution vectors that are mathematically possible.

2.2.2 Convergence Testing

Convergence is detected using three separate tests. If any of the three tests indicate that the algorithm converged, the algorithm is terminated and the best solution vector found in the HM is returned as the optimal target position.

Page 49: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

42 J. Fourie, S. Mills, and R. Green

The first test measures the spatial distance between the best solution in the HM and worst. If the distance is smaller than some threshold and the best solution has a sufficiently high fitness weight (determined by its histogram distance from the reference target histogram) the test passes and convergence is assumed. This test works by assuming that HS has converged when all the solution vectors in the HM become nearly identical. This is usually a good indication that HS found the opti-mal solution but it is also possible that during the initialization phase all vectors gets initialized to an area far from the true target position. Erratic target motion of-ten causes this situation where all candidate solutions in the HM are equally bad but spatially close together indicating possible convergence. It is therefore neces-sary to test the weight of the best vector in the HM and ensure that it is sufficiently high to be confident that HS converged to the correct position before the search is terminated. Figure 3 illustrates how this test would detect convergence in three common situations.

When the first convergence test fails the second test counts the number of con-secutive iterations that have not updated the HM. These idle iterations indicate that no progress is being made and that the target cannot be found or that conver-gence is slow. After a specified number of consecutive idle iterations it is assumed that no further progress will be made and the search is terminated.

When both the first and second test fails the final test bounds the search to a maximum number of iterations. If the number of iterations exceeds the maximum the search is terminated. The convergence tests prevent wasted computations by terminating the search early when no progress is being made or when they detect that the optimal solution has been found. It is important to keep wasted computa-tions to a minimum to ensure real-time performance.

Fig. 3 The first convergence test will fail if the candidates are spread out in the search space or if the best candidate histogram is not sufficiently similar to the reference target histo-gram. In the first example the candidates are too spread out and the search will continue. The second example shows incorrect convergence or bad initialization and the search will continue due to the best candidate not being similar enough to the target. In the last exam-ple the test passes and the search is terminated.

Page 50: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 43

2.2.3 Lost Tracker Recovery

In challenging environments the tracker often loses the target momentarily. This is usually due to the target becoming partially or fully occluded by other objects in the frame or the target moving out of frame. An example of this is seen in Figure 4. Erratic, unpredictable movement can also cause the tracker to become unable to find the target. When the tracker loses its target it must recover quickly and the HSO is reset to search the entire frame instead of concentrating on the area pre-dicted by the motion model.

Detection of a lost tracker is done by comparing the fitness weight of the best candidate from the previous frame with a specified threshold value. If the weight is below the threshold the tracker is considered lost and the search process is adapted until the best candidate’s fitness is again above the threshold.

The search process is adapted by ignoring the motion model and initializing the HM with random solutions from the entire search space (the whole frame). The distributions used to generate random improvisations are also changed from nor-mal around the motion model predicted solution, to uniform covering the whole search space. This indicates that the target can be anywhere in the frame and that all previous knowledge should be disregarded.

The ability to quickly recover when the target is lost is one of the novel advan-tages that the Harmony Filter has over other popular tracking methods like the Kalman Filter. Often when the target moves out of frame or becomes occluded the motion model, which plays a larger role in the Kalman and particle filters, will lead the tracker away from the target’s true position. The tracker then becomes lost and will likely never recover if it only relies on its motion model for direction. The Harmony Filter generally recovers much more quickly due to its weak reli-ance on a predictive motion model.

Fig. 4 In this example the target is an orange square on the wall. In the left image the tracker is successfully tracking the target indicated by the red square drawn around the cor-rect target position. In a later frame the hand occludes the target completely causing the tracker to lose the target.

Page 51: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

44 J. Fourie, S. Mills, and R. Green

In the section that follows the Harmony Filter is compared with a particle filter and a UKF based tracking system in challenging conditions. Its ability to quickly recover from occlusion and erratic movement is shown to be a main reason for its increased overall accuracy and performance.

3 Results

In this section the accuracy and performance of the Harmony Filter is illustrated using two example video sequences. We also compare the results with those ob-tained from particle filter and UKF based visual tracking systems.

The video sequences were captured using a low-cost webcam at a resolution of 352×288 at 15 frames/second. The low frame rate combined with the low resolu-tion and poor image quality makes it difficult to accurately model the target and predict its movement. To further complicate the examples, targets were chosen to move erratically and are often occluded.

Accuracy in both examples is tested by first manually labelling each frame of the video sequence with the correct position of the target. Tracker accuracy is then calculated by measuring the Euclidean distance from the true target position to the position estimated by the target for each frame in the sequence. Each algorithm’s performance is measured by the amount of time it takes to process a single frame and return an estimated target position.

In our first example a man walking along a footpath is chosen as the target. The target and surrounding environment is shown in Figure 5. The sequence starts with the target standing still for several frames at one end of the path and then quickly running in a zigzag way to the end of the path. Near the end of the path the target becomes partially occluded by leaves from the tree in the foreground. He then changes direction and runs back the way he came. The transition from standing motionless to quickly running, combined with rapid changes in direction from the zigzag motion, causes the motion model to fail in accurately predicting the target’s next location. This often causes the tracker to lose the target which makes this ex-ample highly appropriate for testing the tracker’s ability to recover from losing the target.

The results from this test are shown in Figures 6 and 7. In Figure 6 the accu-racy, measured as Euclidean distance from the true position, is compared with a UKF based tracker and a particle filter based tracker. In Figure 7 the performance is compared using the same set of tracker implementations. Two versions of the particle filter is investigated, one with 300 particles and one with 500.

Notice from Figure 6 how the particle filter implementations were unable to re-cover from losing the target near the start of the sequence while the UKF and Har-mony Filter managed to track the target for much longer. Near the end of the se-quence the Harmony Filter loses the target before the UKF does but immediately starts recovering and eventually accurately captures that target again. However, when the UKF loses the target it just drifts further away without ever recovering.

Page 52: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 45

Fig. 5 In this example the target is a man walking along a footpath. Bad light conditions, glare from the building in the background and glare from the wet footpath make this a chal-lenging environment for color histogram based visual tracking.

Fig. 6 The accuracy of the Harmony Filter is compared with three other tracker implemen-tations. In this example the particle filter implementations suffer from early target loss without recovery while both the UKF and Harmony Filter performs well until almost the end of the sequence. Both trackers eventually lose the target due to occlusion but the Har-mony Filter eventually recovers while the UKF does not.

Page 53: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

46 J. Fourie, S. Mills, and R. Green

Fig. 7 The performance of the Harmony Filter is compared with three other tracker imple-mentations. The particle filter implementations lag behind the Harmony Filter and UKF implementations by at least 20ms while the performance difference between the harmony filter and the UKF is negligibly small for this example.

In Figure 7 one notices that the performance of the Harmony Filter varies much more than it does with the other trackers. This is due to the convergence detecting tests that might terminate the search early or late depending on its confidence in the solution. The particle filter implementations are clearly slower than both the UKF and the Harmony Filter but the difference in speed between the UKF and the Harmony Filter is negligible in this example with the Harmony Filter only being slightly faster on average.

In the second example an orange square is chosen as the target and is often oc-cluded by a much larger but similarly colored object (a hand). The target and envi-ronment is shown in Figure 4. As in the previous example the Harmony Filter’s accuracy and performance is compared with that of the UKF and two particle filter implementations.

In this example the target is occluded for several frames by moving a hand in front of the camera lens. At the same time the camera is pulled and rotated ran-domly in all directions to simulate the worst possible erratic motion. During the sequence the target also moves out of frame for several frames forcing all imple-mentations to lose the target. However, the target itself, a simple orange square, is much better represented by a color histogram model than the person in the previ-ous example. This makes it easier for all tracker implementations to find the target and recover it when lost.

The results from the accuracy comparison are shown in Figure 8. Notice that all implementations performed well at the beginning of the sequence before the target

Page 54: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 47

gets occluded. However, at approximately frame 70, occlusion causes all four trackers to lose the target and must recover when the target becomes visible again. The Harmony Filter recovers quickly in most cases while the UKF and particle fil-ters never fully recover in this example.

Fig. 8 The accuracy of the Harmony filter is compared with two particle filter implementa-tions and a UKF implementation. The sub-image is an enlarged section of the graph illus-trating and comparing performance immediately following a long period of occlusion. The Harmony Filter is shown to recover quickly from occlusion while the UKF and particle fil-ters only momentarily recover the target for one or two frames.

An example comparing the behavior of the four trackers during occlusion re-covery and erratic motion is shown in Figure 9. In this example each column represents a frame from the sequence and each row represents a tracker implemen-tation. The Harmony Filter is more accurate in both scale and position compared to the other trackers.

The Harmony Filter’s speed for this example is compared with that of the UKF and particle filter trackers in Figure 10. As in the first example, the Harmony Fil-ter’s speed varies depending on the situation but performs faster on average than the other tracking implementations.

In both the first and second examples we saw that the performance of the Har-mony Filter is not as stable as that of the UKF and particle filter. This is due to the convergence detection scheme of section 2.2.2 that causes the algorithm to termi-nate early or late depending on how difficult the target was to find. The Harmony Filter’s ability to detect convergence early results in good average performance

Page 55: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

48 J. Fourie, S. Mills, and R. Green

Fig. 9 Two frames from a challenging tracking sequence are used to compare the Harmony Filter’s ability to accurately recover the target with that of the UKF and particle filter based trackers. The first image row shows the Harmony Filter accurately indicating the target’s position while the UKF and particle filter trackers still need to recover the target.

over all frames but does not guarantee good performance on every frame unless the maximum number of iterations is bounded to be low enough. One should note that when more stable performance is required the first two convergence tests can be disabled causing the maximum number of iterations to be performed at each frame. The speed of the algorithm can then be controlled by the maximum number of iterations in the same way that the number of particles is used to control the speed of the particle filter.

Page 56: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Visual Tracking Using Harmony Search 49

Fig. 10 The performance of the Harmony filter in the second example is compared with that of the UKF and particle filter trackers. In most cases the Harmony Filter converges faster than its competitors.

4 Conclusions

Accurate visual tracking has been the subject of much research and has tradition-ally focussed on statistical methods. The most success in this field has been ob-tained using variations of the Kalman and particle filters. However, these methods suffer when the surrounding environment makes it difficult to accurately model the target.

In this chapter a visual tracking system based on the Harmony Search algorithm was introduced that could accurately track a poorly modelled target under chal-lenging conditions. Unlike the Kalman and particle filter, no assumption on Gaus-sian system noise is made making the tracker more robust in situations where this assumption cannot be made.

The accuracy of the Harmony Filter under challenging conditions was com-pared with that of the UKF and the particle filter. The Harmony filter was shown to be more accurate in general and is able to recover from losing the target in situations were neither the UKF nor particle filter was able.

References

1. Gutman, P., Velger, M.: Tracking Targets Using Adaptive Kalman Filtering. IEEE Trans. On Aerospace and Electronic Systems 26, 691–699 (1990)

2. Li, M., Hong, B., Cai, Z., Luo, R.: Novel Rao-Blackwellized Particle Filter for Mobile Robot SLAM Using Monocular Vision. International Journal of Intelligent Technol-ogy 1(1), 63–69 (2006)

Page 57: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

50 J. Fourie, S. Mills, and R. Green

3. Li, P., Zhang, T., Ma, B.: Unscented Kalman Filter for Visual Curve Tracking. Image and Vision Computing, 157–164 (2004)

4. Isard, M., Blake, A.: Condensation – Conditional Density Propagation for Visual Tracking. IJCV 29(1), 5–28 (1998)

5. Minami, M., Agbanhan, J., Asakura, T.: Manipulator Visual Servoing and Tracking of Fish Using a Genetic Algorithm. Industrial Robot: An International Journal 26(4), 278–289 (1999)

6. Morsley, Y., Djouadi, M.S.: Genetic Algorithm Combined to IMM Approach for Tracking Highly Maneuvering Targets. IAENG International Journal of Computer Sci-ence 35 (2008); advanced online publication 19 February 2008

7. Sulistijono, I.A., Kubota, N.: Human Head Tracking Based on Particle Swarm Optimi-sation and Genetic Algorithm. Journal of Advanced Computational Intelligence and In-telligent Informatics 11(6), 681–687 (2007)

8. Fourie, J., Mills, S., Green, R.: Visual Tracking Using the Harmony Search Algorithm. In: IVCNZ 23rd International Conference on Image and Vision Computing New Zea-land, pp. 1–6 (2008)

9. Kailath, T.: The Divergence and Bhattacharyya Distance Measures in Signal Selection. IEEE Trans. On Comm. Technology 15(1), 52–60 (1967)

10. Comaniciu, D., Ramesh, V., Meer, P.: Kernel-Based Object Tracking. IEEE Trans. Pattern Anal. Mach. Intell. 25(5), 564–575 (2003)

11. Mahdavi, M., Fesanghary, M., Damangir, E.: An Improved Harmony Search Algo-rithm for Solving Optimization Problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

Page 58: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 51–64. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Web Text Mining Using Harmony Search

Rana Forsati* and Mehrdad Mahdavi**

Abstract. The Harmony Search (HS) algorithm in recent years has been applied in many applications in computer science and engineering. This chapter is intended to review the application of the HS method in the area of web document cluster-ing. Clustering is a problem of great practical importance that has been the focus of substantial research in several domains for decades. It is defined as the problem of partitioning data objects into groups, such that objects in the same group are similar, while objects in different groups are dissimilar. Due to the high-dimension and sparseness properties of documents the problem of clustering becomes more challenging when we apply it on web documents. Two algorithms in literature were proposed for clustering web documents with HS which will be reviewed in this chapter. Also three hybridization of HS based clustering with K-means algo-rithm will be reviewed. It will be shown that the HS method can outperform other methods in terms of solution quality and computational time.

1 Introduction

This chapter deals with the application of Harmony Search (HS) in web document clustering. First, two algorithms based on HS will be presented for clustering where they differ in representation of solutions and application of pitch adjusting process. Then we turn into some hybridization of HS based clustering with K-means algorithm to combine explorative power of HS based algorithm with fine-tuning power of K-means.

Recently, as the web developed rapidly, a large collection of full-text documents in electronic form is available and opportunities to get a useful piece of information from the web are increased. On the other hand, it becomes more difficult to get use-ful information from such giant amount of documents. This causes that research ar-eas such as information retrieval, information filtering and text clustering have been studied actively all over the world. Rana Forsati Department of Electrical and Computer Engineering, Shahid Beheshti University, G. C. Tehran, Iran E-mail: [email protected] Mehrdad Mahdavi Department of Computer Engineering, Sharif University of Technology, Tehran, Iran, E-mail: [email protected]

Page 59: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

52 R. Forsati and M. Mahdavi

Clustering is one of the crucial unsupervised techniques for dealing with mas-sive amounts of heterogeneous information on the web [1]. The clustering involves dividing a set of documents into a specified number of groups. The documents within each group should exhibit a large degree of similarity while the similarity among different clusters should be minimized. Initially, document clustering was evaluated for enhancing the results in information retrieval systems [2]. Then, clustering has been proposed as an efficient way of finding automatically related topics or new ones; in filtering tasks [3] and grouping the retrieved documents into a list of meaningful categories, facilitating query processing by searching only clusters closest to the query [4]. On the web, this task has other additional roles; it can be used for enhancing search engine results, enhancing web crawling, and or-ganizing the knowledge.

Some of the more familiar clustering methods are: partitioning algorithms based on dividing entire data into dissimilar groups, hierarchical methods, density and grid based clustering, some graph based methods and etc. [5, 6]. The aim of clustering is to find the hidden structure underlying a given collection of data points.

The clustering methods proposed in the literature can be classified into two ma-jor categories: discriminative (or similarity-based) approaches and generative (or model-based) approaches [7]. In similarity-based approaches, one optimizes an objective function involving the pairwise document similarities, aiming to maxi-mize the average similarities within clusters and minimize the average similarities between clusters. Model-based approaches, on the other hand, attempt to learn ge-nerative models from the documents, with each model representing one particular document group.

Model-based clustering assumes that the data were generated by a model and tries to recover the original model from the data. The model that we recover from the data then defines clusters and an assignment of documents to clusters. Model-based clustering algorithms are particularly attractive as each iteration is linear in the size of the input. Also, online algorithms can be easily constructed for model-based clustering using competitive learning techniques [7, 8].

In an overall categorization, we can divide the web document clustering algo-rithms from another view into two main categories: hierarchal and partitional algo-rithms. Hierarchical algorithms [9-12] create a hierarchical decomposition of the given dataset forming a dendrogram—a tree which splits the dataset recursively into smaller subsets and represent the documents in a multi-level and tree-like structure [13]. The hierarchical algorithms can be further divided into agglomera-tive algorithms or divisive algorithms [14]. In the agglomerative algorithms, each document is initially assigned to a different cluster. The algorithm then repeatedly merges pairs of clusters until a certain stopping criterion is met [14]. On the other hand, the divisive algorithms divide the whole set of documents into a certain num-ber of clusters. Meanwhile partitioning methods cluster the data in a single level in-stead of a clustering structure, such as the dendrogram produced by a hierarchical technique [15-18].

Page 60: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 53

Although hierarchical methods are often said to have better quality clustering results, usually they do not provide the reallocation of pages, which may have been poorly classified in the early stages of the text analysis [5]. Moreover, thetime complexity of hierarchical methods is quadratic [18]. On the other hands, in recent years the partitioning clustering methods are well suited for clustering a large document dataset due to their relatively low computational requirements [15-19, 13].

Partitioning methods try to partition a collection of documents into a set of groups, so as to maximize a pre-defined fitness value. The clusters can be over-lapped or not. It seems that in recent years the partitioning clustering methods are well suited for clustering a large document dataset due to their relatively low computational requirements [11]. The time complexity of the partitioning tech-nique is almost linear, which makes it widely used. In the field of clustering, K-means algorithm [20] is the most popularly used algorithm to find a partition that minimizes mean square error (MSE) measure, that, in a simple form, selects K documents as cluster centers and assigns each document to the nearest center. The updating and reassigning process can be kept until a convergence criterion is met.

Although K-means is an extensively useful, simple, straightforward, easy to be implemented, and fast in most situations, it suffers from several major drawbacks that make it inappropriate for many applications [21]. The objective function of the K-means is not convex and hence it may contain local minima. Consequently, while minimizing the objective function, there is possibility of getting stuck at lo-cal minima (also at local maxima and saddle point). The performance of the K-means algorithm depends on the initial choice of the cluster centers. To deal with the limitations that exist in traditional partition clustering methods especially K-means, recently, new concepts and techniques have been entered into web data mining, with respect to increasing need for the web knowledge extraction. One major approach is to use machine learning [22, 6, 23] that includes several tech-niques. One of these techniques is optimization methods that try to optimize a pre-defined function, which can be very useful in web document clustering.

The major challenges for document clustering consist currently in the following three domains [24]: very high dimensionality of the data (~ 10,000 terms), very large size of the databases (particularly the World Wide Web) and understandable description of the clusters. K-means [20] (or its variants) is a good choice for above challenges, because of its efficiency and effectiveness [18]. About the clus-tering of large document sets, a major part of efforts have been concerned to the learning methods such as optimization techniques. This is mostly owing to the lack of orthognality, and existing high dimension vectors. One of the advantages of partitional clustering algorithms is that they use information about the collec-tion of documents when they partition the dataset into a certain number of clusters. So, the optimization methods can be employed for partitional clustering. Optimi-zation techniques define a goal function and by traversing the search space, try to optimize its value. Regarding to this definition, K-means can be considered as an optimization method.

Dividing n data into K clusters give rise to a huge number of possible partitions, which is expressed in the form of the Stirling number:

Page 61: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

54 R. Forsati and M. Mahdavi

( )∑=

−⎟⎟⎠

⎞⎜⎜⎝

⎛−

K

i

niK ii

K

K 1

1!

1 (1)

This illustrates that the clustering by examining all possible partitions of n documents of t-dimensions into K clusters is not computationally feasible. Obvi-ously, we need to resort to some optimization techniques to reduce the search space, but then there is no guarantee that the optimal solution will be found. Re-cently, the use of global optimization techniques, such as Genetic Algorithm (GA) [25], Self-Organizing Maps (SOM) [26] and Ant Clustering [27], has been used for document clustering. Particle Swarm Optimization (PSO) [28] is another com-putational intelligence method that has been applied to image clustering and other low dimensional datasets in [29, 30] and to document clustering in [31]. They are capable of searching for optimal or near-optimal solutions on complex, large spaces of possible solutions. Because of this advantage, it may represent another useful tool in the field of cluster analysis. Typically, these stochastic approaches take a large amount of time to converge to a globally optimal partition. Although various optimization methodologies have been developed for optimal clustering, the complexity of the task reveals the need for developing efficient algorithms to precisely locate the optimum solution. In this context, this study presents a novel stochastic approach for document clustering, aiming at a better time complexity and partitioning accuracy.

In fact, in optimization problems, we want to search the solution space and with HS this search can be done more efficiently. Since stochastic optimization ap-proaches are good at avoiding convergence to a locally optimal solution, these ap-proaches could be used to find a globally optimal solution. Typically the stochastic approaches take a large amount of time to converge to a globally optimal partition.

This chapter is organized as follows. In section 2 we concentrate on the model-ing of documents as being suitable for clustering and the different measures for evaluation of clustering algorithm’s efficiency and quality. Then in sections 3 and 4 the HS based algorithms for document clustering will be presented.

2 Web Document Clustering: An Overview

Clustering is defined as the problem of partitioning data objects into groups, such that objects in the same group are similar, while objects in different groups are dissimilar. This definition assumes that there is some well defined notion of simi-larity, or distance, between data objects. When the objects are defined by a set of numerical attributes, there are natural definitions of distance based on geometric analogies. These definitions rely on the semantics of the data values themselves. The definition of distance allows us to define a quality measure for a clustering. Clustering then becomes the problem of grouping together points such that the quality measure is optimized. In this section the process of transforming docu-ments to vectors, similarity measures between document’s vectors and the cluster-ing algorithm evaluation measures will be presented.

Page 62: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 55

2.1 Document Representation and Similarity Computation

In most document clustering algorithms, documents are represented using vector-space model. In this model, each document d is considered to be a vector

{ }tdddd ,,, 21 …= in term-space (set of document “words”) where id is the

weight of dimension i in vector space and t is the number of term dimensions. In text documents each weight id represents the term weight of term i in the docu-

ment. The most widely used weighting approach for term weights is the combina-tion of Term Frequency and Inverse Document Frequency (TF-IDF) [32, 33]. In this approach the weight of term i in document j is defined as (2).

( )jijijijiji dfntfidftfw /log2×=×= (2)

Here tfji is the numbers of occurrences of term i in the document j; dfij is the total term frequency in data set and n is the number of documents.

One of the major problems in text mining is that a document can contain a very large number of words. If each of these words is represented as a vector coordi-nate, the number of dimensions would be too high for the text mining algorithm. Hence, it is crucial to apply preprocessing methods that greatly reduce the number of dimensions (words) to be given to the text mining algorithm. In those document datasets, the very common words (e.g. function words: “a”, “the”, “in”, “to”; pro-nouns: “I”, “he”, “she”, “it”) are stripped out completely and different forms of a word are reduced to one canonical form by using Porter’s algorithm [28] .

The similarity between two documents must be measured in some way if a clustering algorithm is to be used. The vector space model gives us a good oppor-tunity for defining different metrics for similarity between two documents. The most common similarity metrics are Minkowski distances [34] and cosine measure [33-35]. Minkowski distances computes the distance of documents d and d ′ by (3) (for n = 2 it is converted to Euclidean distance).

nt

i

niin ddddD

/1

1

),( ⎟⎟⎠

⎞⎜⎜⎝

⎛′−=′ ∑

= (3)

Cosine measure is defined by (4) where dd T ′⋅ is the inner product (dot-product) of two vectors.

dd

dddd

T

′′•=′),cos( (4)

where “ • ” denotes the dot product of two vectors, and “ • ” denotes the length of

a vector. This measure becomes one if the documents are identical, and zero if there is nothing in common between them (i.e., the vectors are orthogonal to each other).

Both metrics are widely used in the text document clustering literatures. But it seems that in the cases where the number of dimensions of two vectors differs

Page 63: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

56 R. Forsati and M. Mahdavi

largely, the cosine is more useful. In cases which two vectors have almost the same dimension, Minkowski distance can also be useful.

2.2 Quality Measures

To evaluate the performance of different clustering algorithms, we need some measures to evaluate them. Objective clustering evaluation criteria can be based on external, internal, or relative measures [36]. External measures use statistical tests in order to quantify how well a clustering matches the underlying structure of the data. An external quality measure evaluates how well the clustering is working by comparing the groups produced by clustering techniques to known classes. The most important external methods are entropy-based methods, confusion matrix, classification accuracy, average purity [25, 29], and F-measure [16]. In absence of an external judgment, internal clustering quality measures must be used to quantify the validity of a clustering. Internal quality measures are used to compare different sets of clusters without reference to external knowledge. Relative measures can be derived from internal measures by evaluating different clusterings and comparing their scores. However, if one clustering algorithm performs better than other clus-tering algorithms on many of these measures, then we can have some confidence that is truly the best clustering algorithm for the situation being evaluated.

The F-measure tries to capture how well the groups of the investigated partition at the best match the groups of the reference. F-measure compute based on the harmonic means of precision and recall from information retrieval domain. If P and R show Precision and Recall respectively, this measure is defined by preci-sion and recall obtained by (5). In the formulas nij shows the number of members of class j in cluster i (the number of the overlapping member), ni shows the num-ber of members of cluster i and jn shows the number of members in class j.

i

ij

n

njiP =),( ,

j

ij

n

njiR =),(, (5)

The precision, ),( jiP , is the fraction of the documents in the cluster i that are

also in the class j. Whereas the recall, ),( jiR , is the fraction of the pages in the

class j that are in the cluster i. ),( jiP and ),( jiR take values between 0 and 1 and, intuitively, ),( jiP meas-

ures the accuracy with which cluster i reproduces class j, while ),( jiR measures

the completeness with which i reproduces class j. The F-measure for a cluster i and class j combines precision and recall with

equal weight on each as follows:

),(),(

)),(),((2),(

jiRjiP

jiRjiPjiF

+×= (6)

Page 64: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 57

The F-Measure of the whole clustering is:

)},(max{ jiFn

nF

j

j∑= (7)

The F-Measure tries to capture how well the groups of the investigated partition at the best match the groups of the reference. A perfect clustering matches the given partitioning exactly and leads to an F-Measure value of 1.

The second evaluation measure used is the entropy measure, which analyzes the distribution of categories in each cluster. The measure entropy looks at how the various classes of documents are distributed within each cluster. First, the class dis-tribution is calculated for each cluster, then this class distribution will be used to calculated the entropy for each cluster. The entropy E of a cluster ci is defined as:

)log()( ijj

iji nncE ∑−= (8)

where ijn is the probability that a member of cluster j belongs to class i and then

the summation is taken over all classes. After the entropy is calculated, the sum-mation of entropy for each cluster is calculated using the size of each cluster as weight. In other words, the entropy of all produced clusters is calculated as the sum of the individual cluster entropies weighted according to the cluster size, i.e.,

)(1

i

k

i

i cEn

nE ×= ∑

= (9)

where in is the size of cluster i, n is the total number of documents, and k is the

number of clusters. The best clustering solution will be the one that leads to clusters that contain

documents from only a single class, in which case the entropy will be zero. Be-cause the entropy measures the amount of disorder in a system, the smaller the en-tropy values, the better the clustering solution is [37].

The purity measure evaluates the degree to which each cluster contains docu-ments from primarily one class. In other words, it measures the largest class for each cluster. In general, the larger the value of purity, the better the clustering so-lution is. Note that each cluster may contain documents from different classes. The purity gives the ratio of the dominant class size in the cluster to the cluster size it-

self. The value of the purity is always in the interval ⎥⎦⎤

⎢⎣⎡

+ 1,1

K. A large purity val-

ue implies that the cluster is a ‘‘pure” subset of the dominant class. In similar way as entropy, the purity of each cluster ci is calculated as

ijji

i nn

cP max1

)( = (10)

Page 65: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

58 R. Forsati and M. Mahdavi

The purity of all produced clusters is computed as a weighted sum of the indi-vidual cluster purities and is defined as

)(1

i

k

i

i cPn

nP ∑

=∗= (11)

While entropy and the precision measures compare flat partitions (which may be a single level of a hierarchy) with another flat partition the F-measure compares an entire hierarchy with a flat partition.

3 HS Based Clustering: Continuous Representation

In [38] the first HS based algorithm for document clustering was proposed. In this algorithm each cluster centroid is considered as a decision variable; so each row of harmony memory, which contains K decision variables, represents one possible solution for clustering. On the other hand, each row contains a number of candi-date centroids that represents each cluster. In this case, each solution contains K vectors and forms a matrix row, (C1, C2, …, Ci , …, Ck), where Ci is the ith cluster centroid vector and K is the number of clusters. The objective function is to max-imize intra-cluster similarity while minimizing the inter-cluster similarity. The centroid of documents belong to same cluster is computed as:

Ki

a

xa

cn

jij

j

n

jij

i ≤≤=

=

= 1,

)(

1

1 (12)

According to improvising step in the HS algorithm, the new vector is generated in each generation. Fitness value of each row, which corresponds to one potential solution, is determined by Average Distance of Documents to the cluster Centroid (ADDC) represented by each solution. This value is measured by equation:

K

n

dcD

f

k

i i

n

jiji

i

∑∑

=

=

⎪⎪

⎪⎪

⎪⎪

⎪⎪

=

1

1

),(

(13)

where K is the number of clusters, in is the numbers of documents in cluster i, D

is distance function, and ijd is the jth document of cluster i.

The new generated solution is replaced with a row in harmony memory, if the locally optimized vector has better fitness value than those in HM.

Page 66: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 59

Table 1 F-measure values of different algorithms

Dataset K-means HS based clustering

DATASET1

DATASET1

DATASET3

0.65348

0.70639

0.6214

0.72250

0.76560

0.70465

The proposed algorithm is compared to K-means algorithm based on F-measure

quality measure on three datasets [38]. DATASET1 is collected from Politics area and contains 176 web documents that are selected randomly in some topics of Politics. It is collected in 2006. DATASET2 is collected from News sites and con-tains 424 different news texts. This dataset is collected in 2006, as well. DATASET3 is selected from DMOZ collection and contains 697 documents. As is evident from Table 1, HS based clustering algorithm outperforms K-means in all datasets. The main drawback of the algorithm developed in [38] is its continu-ous representation. Continuous representation of clusters’ centroid decreases the efficiency of pitch adjusting process.

4 HS Based Clustering: Discrete Representation

In [39] an algorithm called HKA with discrete representation is proposed for document clustering which codify the whole partition P of the document set in a vector of length n, where n is the number of the documents. Thus, each element of the solution is the label where the single document belongs to; in particular if the number of clusters is K each element of the solution vector is an integer value in the range {1..., K}. Let us consider a data set formed by n documents { }nidi ,,2,1, …= . Also let ijd denote the weight of jth feature of document id .

An assignment that represents K nonempty clusters is a legal assignment. Each as-signment corresponds to a set of K centroids ),,,,,( 21 Ki ccccC ……= .

Thus, the search space is the space of all permutations of size n from the set {1..., K} that satisfy constraint in which each document must be allocated to ex-actly one cluster and there is no cluster that is empty. A natural way of encoding such permutations into a string, s, is to consider each row of HM an integer vector of n positions. Each position corresponds to a document, i.e., the i-th position represents the i-th document. In this encoding, each element corresponds to a doc-ument and its value represents the cluster number to which the corresponding document belongs.

Due to the discrete representation the original PAR process of HS is not appli-cable so the authors proposed an efficient way to apply PAR process. In improvi-sation step each value is selected from harmony memory with probability HMCR and with probability (1– HMCR) is randomly selected from set { }K,,2,1 … . After

generating the new solution, the PAR process is applied. PAR is originally the rate of allocating a different cluster to a document. To apply pitch adjusting process to

Page 67: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

60 R. Forsati and M. Mahdavi

document id the algorithm proceeds as follow. The current cluster of id is re-

placed with a new cluster chosen randomly from the following distribution:

∑=

−==

K

jji

jij

cdDD

cdDDclusternewasselectedisjclusterP

1max

max

)),((

),(}{Pr

(14)

where { }),(maxmax ii cNHVDD = .

Considering the behavior of HKA, it was found that the proposed algorithm is good at finding promising areas of the search space, but not as good as K-means at fine-tuning within those areas, so it may take more time to converge. On the other hand, K-means algorithm is good at fine-tuning, but lack a global perspec-tive. So a hybrid algorithm that combines two ideas is proposed. In the hybrid al-gorithm at each improvisation step a one-step K-means is included to fine-tune the new solution.

The HKA is compared with other algorithms on five standard datasets [39]. Table 2 shows the comparison of F-measure values for K-means and HKA algo-rithms. The results in Table 2 reveal that HKA outperforms K-means algorithm in all of datasets.

Table 2 Comparison of HKA and K-means algorithms based on F-measure

Document Set K-means HKA

DS1

DS2

DS3

0.5632

0.5202

0.6117

0.7662

0.7824

0.8968

DS4 0.7236 0.8692

DS5 0.4236 0.6805

Figure 1 shows the execution time of HKA algorithms with other four algorithms

including K-means, Genetic K-means (GA), Particle Swarm Optimization based clustering (PSO) and a Mises-Fisher Generative Model based algorithm (GM)1 on DS5 [39]. The evaluations were conducted for the document numbers ranging from 1000 to approximately 10,000. For each given document number, 10 test runs were conducted on different randomly chosen documents, and the final performance scores were obtained by averaging the scores from the all tests. Because K-means algorithm is not guaranteed to find the global optimum, it is beneficial to perform K-means algorithm a few times with different initial values and choose the trial with minimal ADDC. The GM algorithm has the lowest runtime in comparison to all of other algorithms because the model-based partitional clustering algorithms often

1 An implementation of this algorithm is available at, http://www.cse.fau.edu/~zhong/

software/index.htm

Page 68: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 61

have a complexity of O(n) where n is the number of documents. In contrast, in the other algorithms calculating the pairwise similarities is more time-consuming.

For small number of documents the runtime of algorithms is approximately same, but by increasing the number of documents the difference becomes signifi-cant. The K-means algorithm has the worst runtime. The runtime of PSO and GA is nearly the same. HKA behaves better than other algorithms except the GM. Specially; the runtime of the HKA is comparable with the GM algorithm.

Fig. 1 Execution time of the HKA algorithm in comparison with GM, K-means, GA, and PSO algorithms on different sub collections of DS5 with different sizes

5 Hybrid HS Based Clustering

In this section we review the final set of HS based algorithms for document clus-tering [40]. These algorithms are the hybridization of HSCLUST algorithm with K-means algorithm in different settings. HSCLUST is same as HKA without one step of K-means in its improvising step. Hybrid algorithms combine the explor-ative power of the HSCLUST with the fine-tuning power of the K-means algo-rithm. In the hybrid HS algorithm, the algorithm includes two modules, the HSCLUST module and the K-means module. The HSCLUST finds the region of the optimum, and then the K-means takes over to fine-tune the optimum centroids. In [40] three different approach were proposed for hybridization. In Sequential hybridization, the algorithm starts with HSCLUST algorithm and after a deter-mined number of generations, the K-means algorithm starts with the best vector in harmony memory obtained by HSCLUST. In other words the HSCLUST finds

Page 69: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

62 R. Forsati and M. Mahdavi

the proximity of best solution and K-means fine-tunes the obtained solution. In In-terleaved Hybridization, after every determined iterations, the K-means uses the best vector from the harmony memory as its starting point. Harmony memory is updated if the locally optimized vectors have better fitness value than those in harmony memory and this procedure repeated until stop condition. The third al-gorithm hybridizes K-means as one step of HSCLUST.

The performances of the algorithms in the document collections considering F-measure are shown in Fig. 2. In comparison of the results from different algo-rithms, obviously, the third hybridized algorithm has the best F-measure among the other algorithms from Figure 2.

Fig. 2 Comparison of the F-measure for hybridized algorithms with HKA and K-mean

6 Summary and Conclusions

This chapter has reviewed various HS applications in finding a globally optimal partition with respect to ADDC criterion when grouping given web documents into a specified number of clusters. Two proposed algorithms in literature mainly differ in the type of representation of solutions (i.e. continuous and discrete vari-ables). In addition some hybrid algorithms were reviewed in this chapter. The hy-brid algorithms try to combine the explorative power of HS with fine-tuning power of another localized algorithm to find optimal solutions. The results show that HS based clustering algorithm is a good choice for clustering large set of documents. From this successful application, it is expected that more problems will be tackled with HS.

Page 70: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Web Text Mining Using Harmony Search 63

References

1. Húsek, D., Pokorný, J., Řezanková, H., et al.: Web data clustering. In: Foundations of Computational Intelligence, vol. 4. Springer, Berlin (2009)

2. Rijsbergen, V.: Information retrieval. Buttersworth, London (1979) 3. Aslam, J., Pelekhov, K., Rus, D.: Using star clusters for filtering. In: Proceedings of

the Ninth International Conference on Information and Knowledge Management, USA (2000)

4. Zhong, S., Ghosh, J.: A comparative study of generative models for document cluster-ing. In: Proceedings of SDM Workshop on Clustering High Dimensional Data and Its Applications (2003)

5. Jain, A.K., Murty, M.N., Flynn, P.J.: Data clustering: A Review. ACM Computing Surveys 31, 264–323 (1999)

6. Grira, N., Crucianu, M., Boujemaa, N.: Unsupervised and semi-supervised clustering: a brief survey. In: Proceedings of 7th ACM SIGMM International Workshop on Mul-timedia Information Retrieval, pp. 9–16 (2005)

7. Zhong, S., Ghosh, J.: Generative model-based clustering of documents: a comparative study. Knowledge and Information Systems (KAIS) 8, 374–384 (2005)

8. Zhong, S.: Semi-supervised model-based document clustering: A Comparative Study. Machine Learning 65, 3–29 (2006)

9. Guha, S., Rastogi, R., Shim, K.: An efficient clustering algorithm for large databases. In: Proceedings of ACM-SIGMOD Int. Conf. Management of Data (SIG-MOD 1998), pp. 73–84 (1998)

10. Karypis, G., Han, E.H., Kumar, V.: CHAMELEON: A hierarchical clustering algo-rithm using dynamic modeling. IEEE Computer 32, 68–75 (1999)

11. Olson, C.F.: Parallel algorithms for hierarchical clustering. Parallel Comput. 21, 1313–1325 (1995)

12. Zhang, T., Ramakrishnan, R., Livny, M.: BIRCH: An efficient data clustering method for very large databases. In: Proceedings of ACM-SIGMOD Int. Conf. Management of Data (SIG-MOD 1996), pp. 103–114 (1996)

13. Zhao, Y., Karypis, G.: Empirical and theoretical comparisons of selected criterion functions for document clustering. Machine Learning 55, 311–331 (2004)

14. Xu, S., Zhang, J.: A parallel hybrid web document clustering algorithm and its per-formance study. Journal of Supercomputing 30, 117–131 (2004)

15. Cutting, D.R., Pedersen, J.O., Karger, D.R., et al.: Scatter/gather: A cluster-based ap-proach to browsing large document collections. In: Proceedings of the ACM SIGIR Copenhagen, pp. 318–329 (1992)

16. Larsen, B., Aone, C.: Fast and effective text mining using linear-time document clus-tering. In: Proceedings of the Fifth ACM SIGKDD Int’l Conference on Knowledge Discovery and Data Mining, pp. 16–22 (1999)

17. Aggarwal, C.C., Gates, S.C., Yu, P.S.: On the merits of building categorization sys-tems by supervised clustering. In: Proceedings of the Fifth ACM SIGKDD Int’l Con-ference on Knowledge Discovery and Data Mining, pp. 352–356 (1999)

18. Steinbach, M., Karypis, G., Kumar, V.: A comparison of document clustering tech-niques. In: KDD 2000, Technical Report, University of Minnesota (2000)

19. Dhillon, I.S.: Co-clustering documents and words using bipartite spectral graph parti-tioning. In: Knowledge Discovery and Data Mining, pp. 269–274 (2001)

20. McQueen, J.B.: Some methods for classification and analysis of multivariate observa-tions. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, pp. 281–297 (1967)

Page 71: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

64 R. Forsati and M. Mahdavi

21. Anderberg, M.R.: Cluster analysis for applications. Academic Press Inc., New York (1973)

22. Stumme, G., Hotho, A., Berendt, B.: Semantic web mining. In: Proceedings of 12th Europ. Conf. on Machine Learning (ECML2001)/5th Europ. Conf. on Principles and Practice of Knowledge Discovery in Databases, PKDD 2001 (2001)

23. Stumme, G., Hotho, A., Berendt, B.: Semantic web mining state of the art and future directions. Journal of Web Semantics: Science, Services and Agents on the World Wide Web 4, 124–143 (2006)

24. Beil, F., Ester, M., Xu, X.: Frequen term-based text clustering. In: Proceedings of 8th Int. Conf. on Knowledge Discovery and Data Mining (KDD 2002), Edmonton, Al-berta, Canada (2002)

25. Raghavan, V.V., Birchand, K.: A clustering strategy based on a formalism of the re-productive process in a natural system. In: Proceedings of the Second International Conference on Information Storage and Retrieval, pp. 10–22 (1979)

26. Cui, X., Potok, T.E., Palathingal, P.: Document clustering using particle swarm opti-mization. In: Proceedings of the IEEE swarm intelligence symposium, pp. 185–191.

27. Labroche, N., Monmarche, N., Venturini, G.: AntClust: ant clustering and web usage mining. In: Proceedings of Genetic and Evolutionary Computation Conference, pp. 25–36 (2003)

28. Kennedy, J., Eberhart, R.C., Shi, Y.: Swarm intelligence. Morgan Kaufmann, New York (2001)

29. Omran, M., Salman, A., Engelbrecht, A.P.: Image classification using particle swarm optimization. In: Proceedings of the 4th Asia-Pacific Conference on Simulated Evolu-tion and Learning (SEAL 2002), pp. 370–374 (2002)

30. Merwe, V.D., Engelbrecht, A.P.: Data clustering using particle swarm optimization. In: Proceedings of IEEE Congress on Evolutionary Computation (CEC 2003), pp. 215–220 (2003)

31. Cui, X., Potok, T.E.: Document clustering analysis based on hybrid PSO+K-means al-gorithm. Journal of Computer Sciences 4, 27–33 (2005)

32. Everitt, B.: Cluster analysis, 2nd edn. Halsted Press, New York (1980) 33. Salton, G.: Automatic text processing. The Transformation, Analysis, and Retrieval of

Information by Computer. Addison-Wesley, Reading (1989) 34. Cios, K., Pedrycs, W., Swiniarski, R.: Data mining methods for knowledge discovery.

Kluwer Academic Publishers, Dordrecht (1998) 35. Salton, G., Buckley, C.: Term-weighting approaches in automatic text retrieval. Infor-

mation Processing and Management 24, 513–523 (1988) 36. Jain, A.K., Richard, C.D.: Algorithm for clustering in data. Prentice Hall, Englewood

Cliffs (1990) 37. Zhao, Y., Karypis, G.: Empirical and theoretical comparisons of selected criterion

functions for document Clustering. Machine Learning 55, 311–331 (2004) 38. Mahdavi, M., Chehreghani, M.H., Abolhassani, H., et al.: Novel meta-heuristic algo-

rithms for clustering web documents. Computer Methods in Applied Mechanics and Engineering 201, 441–451 (2008)

39. Mahdavi, M., Abolhassani, H.: Harmony K-means algorithm for document clustering. Data Mining and Knowledge Discovery 18, 370–391 (2009)

40. Forsati, R., Meybodi, M.R., Mahdavi, M., et al.: Hybridization of K-means and har-mony search methods for web page clustering. In: Proceedings of IEEE/WIC/ACM In-ternational Conference on Web Intelligence and Intelligent Agent Technology, pp. 329–335 (2008)

Page 72: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 65–75. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow with Non-Smooth Cost Function

B.K. Panigrahi1, V. Ravikumar Pandi, Swagatam Das2, and Ajith Abraham3

Abstract. This chapter presents a novel Harmony Search (HS) algorithm used to solve security constrained optimal power flow (OPF) with various generator fuel cost characteristics. HS is a recently developed derivative-free, meta-heuristic opti-mization algorithm, which draws inspiration from the musical process of searching for a perfect state of harmony. This chapter analyses the evolution of the population-variance over successive generations in HS and thereby draws some important atten-tion regarding the explorative power of HS. This novel methodology of modified population variance harmony search algorithm (PVHS) easily takes care of solving optimal power flow problem even with non-smooth and piecewise cost functions. This PVHS algorithm was tested on the IEEE30 bus system with three different types of cost characteristics and compared with other reported results.

1 Introduction

Optimal power flow is the main tool used for planning an economic operation of power system [1]. In the recent attention in OPF shows the importance of the elec-tric utilities to find the optimal secure operating point corresponding to the each loading condition. The problem of solving OPF involves estimating the optimal solution of control variables like generator real power, generator voltage magni-tude and transformer tap settings corresponding to the best objective function. The B.K. Panigrahi and V. Ravikumar Pandi Department of Electrical Engineering, Indian Institute of Technology, Delhi, Hauz Khas, New Delhi, India – 110016 E-mail: [email protected], [email protected]

Swagatam Das Department of Electronics and Telecommunication Engineering, Jadavpur University, Kolkata – 700 032, India E-mail: [email protected]

Ajith Abraham Machine Intelligence Research Labs (MIR Labs), USA E-mail: [email protected]

Page 73: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

66 B.K. Panigrahi et al.

dependent variable includes load bus voltage magnitude, generator reactive power generation, transmission line thermal loading. In general OPF is large scale highly non linear and constrained problem of minimizing the fuel cost.

OPF problem has been solved using many traditional techniques such as non linear programming, quadratic programming, mixed integer programming and in-terior point method. The literature review on these methods is given in Momoh et al. [2, 3]. The disadvantage of these traditional methods is it cannot be applica-ble in case of the prohibited operating regions and multiple fuels. It also has higher sensitivity to initial solution, so it may trap into local optima. The difficul-ties in implementing OPF can be overcome by modern stochastic algorithms such as evolutionary programming (EP) [4], tabu search (TS) [5], improved evolution-ary programming (IEP) [6], modified differential evolution (MDE) [7], particle swarm optimization (PSO) [9], genetic algorithm (GA) [10] and simulated anneal-ing (SA) [11].

In 2001, Geem et al. proposed Harmony Search (HS) [13], a derivative-free, meta-heuristic algorithm, mimicking the improvisation process of music players. Since its inception, HS has found several applications in a wide variety of practi-cal optimization problems like pipe-network design [14], structural optimization [15], vehicle routing problem [16], water distribution networks [17, 23], combined heat and power economic dispatch problem [18], Dam Scheduling [19] and nu-merical optimization [20]. The applicability of harmony search algorithm for dis-crete variable problem is given in [22]. The hybrid version of harmony search with particle swarm optimization applied to water network design is proposed in [24]. In the PVHS [21], the control parameter known as distance bandwidth (bw) has been made equal to the standard deviation of the current population. In this chap-ter we have used this PVHS algorithm to solve optimal power flow problem hav-ing various cost characteristics. The algorithm is applied to IEEE 30 bus test sys-tem effectively to show the appropriateness of the method. The simulation results with three different cost characteristics are comparable with the recently reported results.

2 OPF Problem Formulation

The objective of OPF problem is to minimize the total fuel cost of generators while satisfying several power system steady state security constraints. If x is the vector of state variables consisting of slack bus real power Pg1, load bus voltages VLk, generator reactive power outputs Qgj, and transmission line thermal loading Sl, x can be expressed as:

xT = [Pg1, Vl1,…, VlNL, Qg1,…, QgNG, Sl1, …., SlNB] (1)

where NL, NG and NB are the number of load buses, the number of generators and the number of transmission lines, respectively. u is the vector of control vari-ables consisting of real power outputs Pg except at the slack bus, generator volt-ages Vg, transformer tap settings T. Hence, u can be expressed as:

Page 74: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow 67

uT = [Pg2,….,PgNG,Vg1,….,VgNG,T1,…,TNT] (2)

where NT is the number of regulating transformers. The objective of OPF problem can be expressed as

Minimize ( )∑=

=NG

jgii PFF

1

(3)

where F is the total generator fuel cost and Fi is the fuel cost of generator con-nected to ith bus. The system equality constraints g(x,u) is described by the follow-ing power balance equation

NijiijijYN

jjViVdiPgiP ,...,1cos

1=⎟

⎠⎞⎜

⎝⎛ +−∑

==− δδθ (4)

( ) NiYVVQQ jiijij

N

jjidigi ,...,1sin

1

=+−−=− ∑=

δδθ (5)

where Pgi is the total real power generation at ith bus, Pdi is the total real power demand at ith bus, Qgi is the total reactive power generation at ith bus, Qdi is the to-tal reactive power demand at ith bus, |Vi | is the voltage magnitude at ith bus, |Vj | is the voltage magnitude at jth bus, |Yij | is the magnitude of the ijth element of Ybus, θij angle of the ijth element of Ybus, δi voltage angle at ith bus and δj is the voltage angle at jth bus.

The system inequality constraints h(x, u) is consist of the following

1. Generator constraints: The generator real power outputs, reactive power out-puts and voltages are bounded to its lower and upper limit.

NGiPPP gigigi ,...,1maxmin =≤≤ (6)

NGiQQQ gigigi ,...,1maxmin =≤≤ (7)

NGiVVV gigigi ,...,1maxmin =≤≤ (8)

where mingiP and max

giP are the minimum and maximum real power genera-

tion at ith generator bus, mingiQ and max

giQ are the minimum and maximum

reactive power generation at ith generator bus, mingiV and max

giV are the mini-

mum and maximum voltage magnitude at ith generator bus.

2. Transformer constraints: Transformer tap settings are bounded by minimum and maximum limits as follows

NTiiTiTiT ,...,1maxmin =≤≤ (9)

Page 75: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

68 B.K. Panigrahi et al.

where miniT and max

iT are the minimum and maximum tap setting limit of ith

transformer.

3. Security constraints: It includes the limits in the voltage magnitude of load buses and thermal loading limits of all transmission lines as follows.

NLiVVV LiLiLi ,...,1maxmin =≤≤ (10)

NBiSS lili ,...,1max =≤ (11)

where minLiV and max

LiV are the minimum and maximum voltage magnitude

at ith load bus, maxliS is the thermal limit of ith transmission line.

Constraints Handling: The problem of handling these constraints in the state vari-ables are accommodated in the algorithm by including the constraints violation as quadratic penalty terms in the objective function itself.

( ) ( )

( ) ( )2lim2lim

2lim2lim11

liliSgigiQ

LiLivggpcorr

SSKQQK

VVKPPKFF

−+−

+−+−+= (12)

where Kp, Kv, KQ and KS are the penalty factors corresponding to slack bus real power generation, load bus voltage magnitude, generator reactive power and transmission line thermal loadings, respectively. In the equation (12) the xlim is equals to xmin if x is lesser than the minimum limit and xmax if x is greater than maximum limit.

3 Harmony Search algorithm

3.1 Classical Harmony Search Algorithm

In the harmony search algorithm musician improvises the pitches of his/her in-strument to obtain a better state of harmony. The different steps of the classical HS algorithm are described below:

Step 1: The 1st step is to specify the problem and initialize the parameter values. The optimization problem is defined as minimize (or maximize) )(xf such that

min maxi i

ix x x≤ ≤ , where )(xf is the objective function, x is a solution vector

consisting of N decision variables ( ix ) and minix and max

ix are the lower and up-

per bounds of each decision variable, respectively. Other algorithm parameters, such as harmony memory size (HMS), or the number of solution vectors in the harmony memory; harmony memory considering rate (HMCR); pitch adjusting rate (PAR); and the number of improvisations (NI) or stopping criterion are also specified in this step.

Page 76: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow 69

Step 2: The 2nd step is to initialize the Harmony Memory. The initial harmony

memory is generated from a uniform distribution in the ranges [ min max,i ix x ], as

( )min max minj i i i

ix x r x x= + × − (13)

where 1,2,..,i N= , HMSj 1,2,3...., = , and )1,0( U~r .

Step 3: The third step is known as the ‘improvisation’ step. The New Harmony vector ( )1 2, , , Ny y y y= … is generated by using memory consideration, pitch ad-

justment, and random selection. The procedure works as follows:

Pseudo-code of improvisation in HS for each [ ]Ni ,1∈ do

if ( ) HMCRU ≤1,0 then /*memory consideration*/ j

i iy x= , where ( )HMSUj ,,2,1~ … .

if ( ) PARU ≤1,0 then /* Pitch adjustment */

i iY Y r bw= + × , where ( )1,0~ Ur (14)

else /* random selection */

( )min max mini i i

iy x r x x= + ⋅ − (15)

endif done Step 4: In this step the harmony memory is updated. The generated harmony vec-tor ( )1 2, , , Ny y y y= … replaces the worst harmony in the HM (harmony memory)

only if its fitness is better than the worst harmony.

Step 5: The stopping criterion (generally the number of iterations) is checked. If it is satisfied, computation is terminated. Otherwise, Steps 3 and 4 are repeated.

3.2 Modified Population Variance Harmony Search (PVHS) Algorithm

In [21] Mukhopadhyay et al. analyze the explorative power in HS as follows:

Theorem 1. Let },,,{ 21 Nxxxx …= be the current population, },,,{ 21 NYYYY …=

the intermediate population obtained after harmony memory consideration and pitch adjustment. If HMCR be the harmony memory consideration probability, PAR the pitch-adjustment probability, bw the arbitrary distance bandwidth and if we consider the allowable range for the decision variables (xi) to be {xmin , xmax} where xmax = a, xmin = – a, then

Page 77: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

70 B.K. Panigrahi et al.

( )( ) ( ) ( ) ( )

( )( )

2

_

22

1E var [ var 1

11

1 ]3 4 3

mY HMCR x HMCR HMCR x

m

HMCR HMCR PAR bw xHMCR PAR a

HMCR PAR bw HMCR

−= ⋅ ⋅ + ⋅ − ⋅

+ ⋅ − ⋅ ⋅ ⋅⋅⎛ ⎞+ ⋅ ⋅ ⋅ − + ⋅ −⎜ ⎟

⎝ ⎠

(16)

If HMCR is chosen to be very high (i.e. very near to 1) and the distance band-width parameter ( bw ) is chosen to be the standard deviation of the current popula-tion, then population variance (without selection) will grow almost exponentially over generations. Now, Neglecting the terms containing ( )HMCR−1 , and choos-

ing ( ) ( )xxbw varσ == the expression (16) becomes:

( )( ) ( ) ( )xPARHMCR

PARHMCRHMCRm

mY var

43

11varE ⋅⎥

⎤⎢⎣

⎡⎟⎠⎞

⎜⎝⎛ ⋅−⋅⋅+⋅−= (17)

From equation (17) it is seen that if we do not include selection in the algo-rithm, then the expected variance of the gth population ( gX ) becomes:

( )( ) ( ) ( )0var43

11varE X

PARHMCRPARHMCRHMCR

m

mX

g

g ⋅⎪⎭

⎪⎬⎫

⎪⎩

⎪⎨⎧

⎥⎦

⎤⎢⎣

⎡⎟⎠⎞

⎜⎝⎛ ⋅−⋅⋅+⋅−= (18)

In equation (10) if we choose the values of the parameters HMCR, PAR in such a way that the term within the second brackets becomes greater than unity, then we can expect an exponential growth of population variance. This growth of ex-pected population variance over generations gives the algorithm a strong explor-ative power. In modified HS the bw is changed dynamically as

( ) ( )xvarxσ = (19)

We also took HMCR = 0.98 and PAR = 0.67 to equip the algorithm with more explorative power after performing a series of experiments.

4 Implementation for OPF

The optimal power flow problem is implemented using the PVHS algorithm by taking the control variables u in the each harmony memory and equation (12) as objective. The algorithm stops when the current generation exceeds the total num-ber of generation. The parameters are selected as: total number of generation = 100, harmony memory size (HMS) = 50, harmony memory considering rate (HMCR) = 0.98, pitch adjusting rate (PAR) = 0.67. The detailed implementation methodology is described as follows:

Step 1: Initialize harmony memory size (HMS), harmony memory considering rate (HMCR), pitch adjusting rate (PAR)

Step 2: Initialize harmonic memory and evaluate objective function after running load flow

Page 78: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow 71

Step 3: Improvisation of harmony memory by pitch adjustment

Step 4: Run load flow and evaluate the objective function

Step 5: Update the harmony memory with this improvised solution if it is better than worst solution in memory

Step 6: If stopping criteria is met then print the OPF result and stop, otherwise go to step3.

5 Results and Discussion

The PVHS algorithm was tested on IEEE30 bus system consists of 6 generating units, 41 transmission lines and 4 tap-changing transformers [8]. The lower and upper limits on independent variables are shown in Table 1. In all the cases bus 1 is considered as swing bus. The simulation was done by taking a quadratic cost curve in case 1, a piecewise quadratic cost curve in case 2, and quadratic cost curve with valve point loading in case 3. The result of the PVHS algorithm is compared with NLP [8], EP [4], TS [5], PSO [9], IEP [6] and MDE [7]. The algo-rithm is coded on Intel Pentium IV 2.3 GHz processor and 2 GB RAM memory using Matlab 7.4 [12] programming language.

Table 1 Cost Results of PVHS Algorithm

Parameter Lower Limit

Upper Limit

Case1 Case2 Case3

Pg1 50 200 176.1824 139.9997 197.5413 Pg2 20 80 48.8268 54.9998 52.0571 Pg5 15 50 21.5131 24.0997 15.0000 Pg8 10 35 22.126 34.9994 10.0000 Pg11 10 30 12.224 18.4566 10.0000 Pg13 12 40 12.0011 17.9266 12.0000 Vg1 0.95 1.05 1.0500 1.0500 1.0333 Vg2 0.95 1.10 1.0381 1.0403 1.0100 Vg5 0.95 1.10 1.0114 1.0145 0.9657 Vg8 0.95 1.10 1.0192 1.0256 1.0307 Vg11 0.95 1.10 1.0866 1.0786 1.0981 Vg13 0.95 1.10 1.0847 1.0837 1.1000 T11 0.90 1.10 1.0247 1.0059 1.0978 T12 0.90 1.10 0.9267 0.9482 1.0983 T15 0.90 1.10 0.9993 1.0033 1.0703 T36 0.90 1.10 0.9422 0.9463 1.0141 Ploss 9.4734 7.0818 13.1984

Sum(Pg) 292.8734 290.4818 296.5984 Penalty 0.0000 0.0000 0.0004

Best Cost 802.3764 647.8126 930.723

Page 79: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

72 B.K. Panigrahi et al.

5.1 Case 1

In this case the fuel cost characteristics of all the 6 generating units are given by quadratic cost function as

( ) ∑∑==

++==NG

igiigiii

NG

igii PcPbaPFf

1

2

1

(20)

where ai, bi and ci are the cost coefficients of the ith generator. The generator cost co-efficients are found in [6] and the optimized parameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm is compared in Table 2 with other reported results. The statistical results of 50 trials are also reported in Table 2. The algorithm converges quickly and the results are better than others. The convergence characteristic of PVHS algorithm for this case is shown in Figure 1.

Table 2 Cost Comparison with Other Methods for Case 1

Parameter NLP[8] EP[4] IEP[6] MDE [7] PVHS Best Cost 802.40 802.62 802.465 802.376 802.3764

Worst cost - 805.61 802.581 802.404 802.3912Avg cost - 803.51 802.521 802.382 802.3805Std cost - - 0.039 - 0.0135

Fig. 1 Convergence of PVHS Algorithm for Case 1

5.2 Case 2

In this case the fuel cost characteristics of the generating units connected at bus 1 and bus 2 are having piecewise quadratic cost curve [6] to model different fuels.

( )⎪⎪

⎪⎪

≤<++

≤<++≤≤++

=

− max12

212222

1min2111

,

......

,

,

gigik

gigiikgiikik

gigigigiigiii

gigigigiigiii

gii

PPPPcPba

PPPPcPba

PPPPcPba

PF (21)

Page 80: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow 73

where aik, bik and cik are the cost coefficients of the ith generator at the kth interval. The other 4 generators are having same quadratic cost curve coefficients as men-tioned in Case 1. The generator cost coefficients are found in [6] and the opti-mized parameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm are compared in Table 3 with other reported results using modified differential evolution algorithm (MDE) [7]. The algorithm converges quickly and the results are better than the other.

Table 3 Cost Comparison with Other Methods for Case2

Parameter MDE[7] PVHS

Best Cost 647.846 647.8126Worst cost 650.664 648.8110Avg cost 648.356 648.2448

Std cost - 0.2681

5.3 Case 3

In this case the fuel cost characteristics of the generating units connected at bus 1 and bus 2 are also having a sine component to model the valve point loading effect of the generators as

( ) ( )( )2 minsini gi i i gi i gi i i gi giF P a b P c P d e P P= + + + − (22)

where ai, bi, ci, di and ei are the cost coefficients of the ith generating unit. The other 4 generators are having same quadratic cost curve coefficients as mentioned in Case 1. The generator cost coefficients are found in [6] and the optimized pa-rameters corresponding to minimum cost is given in Table 1. The results of the PVHS algorithm are compared in Table 4 with other reported results using im-proved evolutionary programming (IEP) [6], and modified differential evolution algorithm (MDE) [7]. The algorithm converges quickly and the results are better than the others.

Table 4 Cost Comparison with Other Methods for Case 3

Parameter IEP[6] MDE[7] PVHS

Best Cost 953.573 930.793 930.7237

Worst cost 958.263 954.073 930.7764

Avg cost 956.460 942.501 930.7380Std cost 1.720 - 0.0162

6 Summary and Conclusions

In this chapter, detailed discussion is carried out about the application of popula-tion variance harmony search algorithm to solve the optimal power flow problem

Page 81: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

74 B.K. Panigrahi et al.

in the presence of security constraints. The algorithm explores the search space quickly with the help of population variance parameter. The PVHS algorithm was tested with IEEE 30 bus test system having three different types of cost character-istics. The comparison of obtained results with other previously reported results shows the effectiveness of the algorithm.

References

1. Wood, A.J., Wollenberg, B.F.: Power Generation, Operation and Control. John Wiley & Sons, New York (1984)

2. Momoh, J.A., El-Hawary, M.E., Adapa, R.: A review of selected optimal power flow literature to 1993 Part I: Nonlinear and quadratic programming approaches. IEEE Trans. on Power Systems 14, 96–104 (1999)

3. Momoh, J.A., El-Hawary, M.E., Adapa, R.: A review of selected optimal power flow literature to 1993 Part II: Newton, linear programming and interior point methods. IEEE Trans. on Power Systems 14, 105–111 (1999)

4. Yuryevich, J., Wong, K.P.: Evolutionary programming based optimal power flow al-gorithm. IEEE Trans. on Power Systems 14, 1245–1250 (1999)

5. Abido, M.A.: Optimal power flow using tabu search algorithm. Electric Power Com-ponents and Systems 30, 469–483 (2002)

6. Ongsakul, W., Tantimaporn, T.: Optimal power flow by improved evolutionary pro-gramming. Electric Power Components and Systems 34, 79–95 (2006)

7. sayah, S., Zehar, K.: Modified differential evolution algorithm for optimal power flow with non-smooth cost functions. Energy Conversion and Management 49, 3036–3042 (2008)

8. Alsac, O., Stott, B.: Optimal load flow with steady-state security. IEEE Trans. on Power Apparatus Systems 93, 745–751 (1974)

9. Abido, M.A.: Optimal power flow using particle swarm optimization. Electric Power Energy Systems 24, 563–571 (2002)

10. Bakirtzis, A.G., Biskas, P.N., Zoumas, C.E., Petridis, V.: Optimal power flow by en-hanced genetic algorithm. IEEE Trans. on Power Systems 17, 229–236 (2002)

11. Roa-Sepulveda, C.A., Pavez-Lazo, B.J.: A solution to the optimal power flow using simulated annealing. Electric Power Energy Systems 25, 47–57 (2003)

12. Matlab (2007), http://www.mathworks.com 13. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm:

harmony search. Simulation 76, 60–68 (2001) 14. Geem, Z.W., Kim, J.H., Loganathan, G.V.: Harmony search optimization: application

to pipe network design. Int. J. Model. Simulation 22, 125–133 (2002) 15. Lee, K.S., Geem, Z.W.: A new structural optimization method based on the harmony

search algorithm. Comput. Struct. 82, 781–798 (2004) 16. Geem, Z.W., Lee, K.S., Park, Y.: Application of Harmony Search to Vehicle Routing.

American Journal of Applied Sciences 2, 1552–1557 (2005) 17. Geem, Z.W.: Optimal Cost Design of Water Distribution Networks Using Harmony

Search. Engineering Optimization 38, 259–280 (2006) 18. Vasebi, A., Fesanghary, M., Bathaeea, S.M.T.: Combined heat and power economic

dispatch by Harmony Search Algorithm. International Journal of Electrical Power and Energy Systems 29, 713–719 (2007)

Page 82: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Population Variance Harmony Search Algorithm to Solve Optimal Power Flow 75

19. Geem, Z.W.: Optimal Scheduling of Multiple Dam System Using Harmony Search Al-gorithm. In: Sandoval, F., Prieto, A.G., Cabestany, J., Graña, M. (eds.) IWANN 2007. LNCS, vol. 4507, pp. 316–323. Springer, Heidelberg (2007)

20. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved Harmony Search Algo-rithm for Solving Optimization Problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

21. Mukhopadhyay, A., Roy, A., Das, S., Das, S., Abraham, A.: Population-Variance and Explorative Power of Harmony Search: An Analysis. In: Third IEEE International Conference on Digital Information Management (ICDIM 2008), pp. 13–16 (2008)

22. Geem, Z.W.: Novel Derivative of Harmony Search Algorithm for Discrete Design Variables. Applied Mathematics and Computation 199, 223–230 (2008)

23. Geem, Z.W.: Harmony Search Optimization to the Pump-Included Water Distribution Network Design. Civil Engineering and Environmental Systems 26, 211–221 (2009)

24. Geem, Z.W.: Particle-Swarm Harmony Search for Water Network Design. Engineer-ing Optimization 41, 297–311 (2009)

Page 83: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 77–88. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

A Harmony Search Approach Using Exponential Probability Distribution Applied to Fuzzy Logic Control Optimization

Leandro dos Santos Coelho and Diego L. de A. Bernert*

Abstract. Fuzzy logic control (FLC) systems have been investigated in many technical and industrial applications as a powerful modeling tool that can cope with the uncertainties and nonlinearities of modern control systems. However, a drawback of FLC methodologies in the industrial environment is the number of tuning parameters to be selected. In this context, a broad class of meta-heuristics has been developed for optimization tasks. Recently, a meta-heuristic called har-mony search (HS) algorithm has emerged. HS was conceptualized using an anal-ogy with music improvisation process where music players improvise the pitches of their instruments to obtain better harmony. Inspired by the HS optimization method, this work presents an improved HS (IHS) approach using exponential probability distribution to optimize the design parameters of a FLC with fuzzy PI (proportional-integral) plus derivative action conception. Numerical results pre-sented here indicate that validated FLC design with IHS tuning is effective for the control of a pH neutralization nonlinear process.

1 Introduction

Fuzzy logic has the capability to handle imprecise information through linguistic expressions. Fuzzy logic techniques have been successfully applied on the control system without exact mathematical plant model, complex and time-varying dy-namic processes [1-4]. A reason behind the increasing popularity of FLCs is that FLCs essentially incorporate human expertise in control strategy for controlling processes, exploiting the easier understanding of linguistic interpretation.

On the other hand, it is well known that up until now, a conventional propor-tional-integral-derivative (PID) type controller is most widely used in industry due to its simple control structure, ease of design, and inexpensive cost. However, the PID type controller cannot yield a good control performance if a controlled object is highly nonlinear and uncertain [5]. Leandro dos Santos Coelho and Diego L. de A. Bernert Industrial and Systems Engineering Graduate Program, Pontifical Catholic University of Paraná, Curitiba, Paraná, Brazil E-mail: [email protected], [email protected]

Page 84: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

78 L. dos Santos Coelho and D.L. de A. Bernert

To nullify the basic disadvantages associated with the construction of a three-dimensional rule base, researchers in the past decade have proposed different two-input PID-type FLC structures, as combinations of two-term FLCs. See de-sign examples combining the FLC and classical proportional, integral, derivative, proportional-integral, and proportional-derivative controllers in [6-13].

Adding the difficulty of having to tune the membership functions, fuzzy control rules, and scaling factors of FLC-PID, to an unsystematic design procedure usually makes it impossible to achieve adequate performance because the controlled proc-ess is too complex. To overcome this flaw, a lot of researches use genetic algo-rithms [14-19] to be able to optimally set the parameters of the fuzzy controllers.

Recently, a new class of meta-heuristics, named harmony search (HS), has been developed. The HS algorithm proposed in [20] has been recently developed in an analogy with music improvisation process where musicians in an ensemble con-tinue to polish their pitches in order to obtain better harmony. Jazz improvisation seeks to find musically pleasing harmony similar to the optimum design process which seeks to find optimum solution. The pitch of each musical instrument de-termines the aesthetic quality, just as the objective function value is determined by the set of values assigned to each decision variable [21]. In addition, HS uses a stochastic random search instead of a gradient search so that derivative informa-tion is unnecessary.

This chapter proposes an improved HS (IHS) approach to optimize the scaling factors of a FLC with fuzzy PI (proportional-integral) plus derivative action con-ception (FLC-PI-D). A contribution of this chapter is the analysis and discussion of the FLC-PI-D control issue using IHS tuning. The FLC-PI-D designs using classical HS and IHS algorithms are compared and have been applied to a pH neu-tralization nonlinear process.

The remaining sections of this chapter are organized as follows: in section 2, fundamentals of FLCs and FLC-PI-D are shown. Section 3 describes the HS and IHS. In section 4, the description of a pH neutralization nonlinear process and the simulation results obtained by FLC-PI-D are evaluated. Lastly, section 5 presents our conclusions and future research works.

2 Fundamentals of Fuzzy Logic Control

Fuzzy set theory was introduced in [22] and can be utilized to transform an inexact knowledge into the form of a computer algorithm. In applications it is used by de-fining a fuzzy system with linguistic variables and with a set of if-then rules.

Being composed of control rules of conditional linguistic statements that state the relationship between input and output variables, the FLCs have the enticing abilities of emulating human knowledge and experiences and dealing with model uncertainty. FLCs are typically defined by the nonlinear mapping of system state space for the control space. However, it is possible to identify the result of a FLC as a control surface reflecting the operator’s (or control engineer’s) prior knowl-edge of the process. The control surface is coded into a knowledge base using a compiler to execute rule-base, termsets, and scale factors [23].

Page 85: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search Approach Using Exponential Probability Distribution 79

Classical FLCs design presents a data flow that is dealt with a fuzzification phase, analysis and execution of rules and, a defuzzification phase as seen in Figure 1.

Fig. 1 Representation of a fuzzy controller

There are two major types of fuzzy controllers: FLCs based on linguistic model (Mamdani type) [24] and FLCs based on interpolative model (Takagi-Sugeno type) [25]. The major difference is that Mamdani fuzzy controllers use fuzzy sets whereas Takagi-Sugeno fuzzy controllers employ functions of input variables in consequent of fuzzy control rules. In this chapter, the FLC of Mamdani type is adopted.

2.1 FLC-PI-D Controller

PID (proportional-integral-derivative) controllers are designed for linear systems and they provide a preferable cost/benefit ratio. However, the presences of nonlin-ear effects limit their performances. FLCs are successfully applied to nonlinear system because of their knowledge based on nonlinear structural characteristics. Hybridization of these two controller structures comes to one’s mind immediately to exploit the beneficial sides of both categories.

In this context, fuzzy logic approaches have been shown in numerous studies to be a simpler alternative to improve conventional PID control performance [2, 8, 11], where the usual FLC structure is the FLC-PI or the FLC-PD. This section presents the description of a FLC-PI-D design. The FLC-PI-D design, as proposed by [5, 26], consists of a fuzzy PI plus the derivative control action of the process output,

)(kuD , where:

[ ])()()( kukuKku DPIcPID +⋅= (1)

)()()( keKkeKku eePI ∆⋅+⋅= ∆ (2)

)()()( kykyke r−= (3)

)1()()( −−=∆ kekeke , (4)

Page 86: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

80 L. dos Santos Coelho and D.L. de A. Bernert

where Kc, Ke, and K∆e are scaling factors, e(k) is the error signal, ∆e(k) is the change of error signal, y(k) is the output signal, and yr(k) is the setpoint signal. The variables uPI(k) and uD(k) are the control signals of PI and D controllers, respec-tively. In this context, the derivative control action has the following equation:

)()()( kykyKku rDD −⋅= , (5)

where KD is the derivative gain constant. The principle of this design is that the FLC-PI-D control algorithm has the

benefit of implementing the derivative control on the output, avoiding derivative kicks for step setpoint (reference) changes. The basic control diagram and mem-bership functions of FLC-PI-D are shown in Figures 2 and 3, respectively.

In this chapter, the following linguistic terms are used: P (Positive), N (Nega-tive), Z (Zero), NS (Negative Small), NB (Negative Big), PS (Positive Small) and PB (Positive Big). In this work, the triangular shape and singleton forms are adopted how membership functions of the FLC-PI-D design.

Fig. 2 Basic control diagram of the FPI+D

Fig. 3 Membership Functions of the FPI+D

Page 87: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search Approach Using Exponential Probability Distribution 81

3 Optimization Based on Harmony Search Algorithm

This section describes the proposed IHS algorithm. First, a brief overview of the HS is provided, and finally the modification procedures of the proposed IHS algo-rithm are presented.

3.1 Harmony Search (HS)

Recently, Geem et al. [20] proposed a new HS meta-heuristic algorithm that was inspired by musical process of searching for a perfect state of harmony. The har-mony in music is analogous to the optimization solution vector, and the musi-cian’s improvisations are analogous to local and global search schemes in optimi-zation techniques. The HS algorithm does not require initial values for the decision variables. Furthermore, instead of a gradient search, the HS algorithm uses a stochastic random search that is based on the harmony memory considering rate and the pitch adjusting rate so that derivative information is unnecessary. Compared to earlier meta-heuristic optimization algorithms, the HS algorithm im-poses fewer mathematical requirements and can be easily adopted for various types of engineering optimization problems [21].

In the HS algorithm, musical performances seek a perfect state of harmony de-termined by aesthetic estimation, as the optimization algorithms seek a best state (i.e. global optimum) determined by objective function value. The optimization procedure of the HS algorithm consists of following steps [27]:

Step 1. Initialize the optimization problem and HS algorithm parameters. First, the optimization problem is specified as follows:

Minimize f(x) subject to xi ∈ Xi, i = 1,..., N (6)

where f(x) is the objective function, x is the set of each decision variable (xi); Xi is the set of the possible range of values for each design variable (continuous design variables), that is, xi,lower ≤ Xi ≤ xi,upper, where xi,lower and xi,upper are the lower and upper bounds for each decision variable; and N is the number of design variables. In this context, the HS algorithm parameters that are required to solve the optimization problem are also specified in this step. The number of solution vectors in harmony memory (HMS), that is the size of the harmony memory matrix, harmony memory considering rate (HMCR), pitch adjusting rate (PAR), and the maximum number of searches (stopping criterion) are selected in this step. Here, HMCR and PAR are parameters that are used to improve the solution vector. Both are defined in Step 3.

Step 2. Initialize the harmony memory. The harmony memory (HM) is a memory location where all the solution vectors (sets of decision variables) are stored. In Step 2, the HM matrix, shown in Equation 7, is filled with randomly generated so-lution vectors using uniform distribution, where

Page 88: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

82 L. dos Santos Coelho and D.L. de A. Bernert

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

=

−HMSHMS

1HMS2

HMS1

1-HMS1-HMS1

1-HMS2

1-HMS1

221

22

21

111

12

11

HM

NN

NN

NN-

NN-

xxxx

xxxx

xxxx

xxxx

(7)

Step 3. Improvise a new harmony from the HM. A new harmony vector, ),...,,(' ''

2'1 Nxxxx = , is generated based on three rules: i) memory consideration, ii)

pitch adjustment, and iii) random selection. The generation of a new harmony is called ‘improvisation’.

In the memory consideration, the value of the first decision variable ( '1x ) for

the new vector is chosen from any value in the specified HM range )~( 111

HMSxx .

Values of the other decision variables )~( ''2 Nxx are chosen in the same manner.

The HMCR, which varies between 0 and 1, is the rate of choosing one value from the historical values stored in the HM, while (1 - HMCR) is the rate of randomly selecting one value from the possible range of values.

{ }

⎪⎩

⎪⎨⎧

∈∈←

HMCR).-(1y probabilit with

HMCRy probabilit with ,...,,'

HMS21''

ii

iiiii

Xx

xxxxx (8)

After, every component obtained by the memory consideration is examined to determine whether it should be pitch-adjusted. This operation uses the PAR pa-rameter, which is the rate of pitch adjustment as follows:

⎩⎨⎧

←PAR).-(1y probabilit with No

PARy probabilit with Yesfor decision adjustingPitch '

ix (9)

The value of (1 - PAR) sets the rate of doing nothing. If the pitch adjustment

decision for 'ix is Yes, '

ix is replaced as follows:

,'' bwrxx ii ⋅±← (10)

where bw is an arbitrary distance bandwidth, r is a random number generated us-ing uniform distribution between 0 and 1.

In Step 3, HM consideration, pitch adjustment or random selection is applied to each variable of the new harmony vector in turn. Step 4. Update the HM. If the new harmony vector, ),...,,(' ''

2'1 Nxxxx = is better

than the worst harmony in the HM, judged in terms of the objective function value, F, the new harmony is included in the HM and the existing worst harmony is excluded from the HM.

Page 89: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search Approach Using Exponential Probability Distribution 83

Step 5. Repeat Steps 3 and 4 until the stopping criterion has been satisfied. Usu-ally stopping criterion is a sufficiently good objective function or a maximum number of iterations (generations), tmax. Maximum number of iterations criterion is adopted in this work.

3.2 Improved HS (IHS) Using Exponential Probability Distribution

Recently, the use of exponential probability distribution to generate random num-bers has been used in evolutionary algorithms [28-30].

Inspired by works of [28, 29], in this chapter, we present an improved HS algo-rithm using exponential probability distribution. The exponential probability dis-tribution E(a,b) with density function used in this work is given by:

( ) .0,with,,/exp2

1)( >∞<≤∞−−−= baxbax

bxf (11)

It is evident that one can control the variance by changing the parameters a and b. Our goal is to investigate how this distribution influences the performance of HS. Generating random numbers from the absolute value of the exponential distribution, given by AE, is described as follows [29]:

a = 0.3 (value adopted in this chapter) b = 0.1 (value adopted in this chapter)

1u = rand (number with uniform distribution in the range [0;1])

2u = rand (number with uniform distribution in the range [0;1])

if 1u > 0.5

x = a + b log( 2u )

else x = a – b log( 2u )

end AE = |x|

Fig. 4 Generating random numbers with exponential distribution adopted in IHS

Generating random numbers using |E(a,b)| for the value of r (see Equation 10 in classical HS) in IHS may provide a good compromise between the probability of having a large number of small amplitudes around the current points (fine tun-ing) and a small probability of having higher amplitudes, which may allow the harmonies to move away from the current point and escape from local minima.

In the IHS algorithm, the Equation 10 of classical HS is modified for

,'' bwAExx ii ⋅±← (12)

where AE is the absolute value of a number generated with exponential probability distribution.

Page 90: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

84 L. dos Santos Coelho and D.L. de A. Bernert

4 Description of pH System and Simulation Results

The evaluated case study represents the pH neutralization system described in [31]. The system has the feed streams which are composed of N components (thick stock, chemical additives and white water) and a titration stream (acid or base) at the mixing box. To simplify the formulation, a perfect mixing is assumed after the thin stock passes through the pipe to the open headbox. Therefore, the measured pH value at headbox can represent the real pH value of the thin stock which is fed to the wire section. In this context, the state space equation in con-tinuous time domain is given by [31]

uxxFdt

dxV )1( −=⋅+ (13)

0)0( =x if 0 ,0)( <= ttu (14)

)(xfpH = (15)

where V is the total volume of the solution in the flow box (ℓ), F is total flow rate of the feed (thick stock, chemicals and white water) (ℓ/min), u is the flow rate of the titration stream (acid or base) (ℓ/min) limited in the range (0, 3), and f(x) is a monotonic increasing function representing the equivalent titration curve.

Assuming that the zero order hold is used, Equation 13 can be expressed in dis-crete form by

( ) ( ))(

)()(exp1

)(exp)()1(

tuF

tu

V

TtuF

V

TtuFtxtx ss

+⎭⎬⎫

⎩⎨⎧

⎥⎦⎤

⎢⎣⎡ +−−+⎥⎦

⎤⎢⎣⎡ +−⋅=+

(16)

))1(()1( +=+ txftpH (17)

⎥⎦

⎤⎢⎣

⎡+⎟

⎞⎜⎝

⎛ −⋅==+ 8.105.0

5.0)(178.4))(()1(

txanattxftpH , (18)

where Ts is the sampling time and the values of pH (process output) are in range (0, 14). In this chapter, V = 2 ℓ, Ts = 0.1 min, and F = 1 ℓ/min are adopted.

The effectiveness and advantages of the proposed FLC-PI-D based on HS and IHS approaches are demonstrated through controlling the pH neutralization sys-tem, where is adopted the following setup:

• Reference trajectory in optimization phase (servo behavior): The desired refer-

ence signal is given by yr(k) = 2 (from sample 1 to 100), yr(k) = 10 (from sam-ple 101 to 200), and yr(k) = 13 (from sample 201 to 300).

• Optimization procedure: The HS and IHS approaches are used in optimization procedure of scaling factor parameters of FLC-PI-D. In the sequel it illustrates the main features of the HS and IHS approaches employed:

Page 91: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search Approach Using Exponential Probability Distribution 85

(i) Objective function: In this work, the objective function to be maximized is given by

[ ]2

1)1()(04.0)(1

10

−−⋅+∑+=

=kukuke

JN

k

. (19)

(ii) Search space used in HS and IHS approaches: Ke, K∆e, Kc ∈ [-40, 40] and KD ∈ [-0.3, 0.3].

The classical HS and IHS algorithms were implemented in MATLAB (Math-

Works). All the programs were run under Windows XP on a 3.2 GHz Pentium IV processor with 2 GB of random access memory. To eliminate stochastic discrep-ancy, in each case study, it adopted 30 independent runs for each of the optimiza-tion methods involving 30 different initial trial solutions for each optimization method.

The total number of solution vectors in classical HS and IHS, i.e., the HMS was 20 and tmax = 300 generations. Furthermore, the bw, HMCR and PAR were 0.01, 0.9 and 0.3, respectively, in tested HS approaches.

In this work, the adjustment of the rule base of FLC-PI-D was accomplished by fine tuning and heuristic corrections linked to the knowledge of the process to be controlled, as shown in Figure 5.

Fig. 5 Rule base adopted for the FLC-PI-D design

Tables 1 and 2 summarize the performance and design parameters of FLC-PI-D optimized by HS and IHS methods for 30 runs. As can be seen, for the pH control using FLC-PI-D, the best mean, minimum, and maximum from the 30 runs per-formed was using IHS. In this context, the best solution was obtained using IHS with the objective function J = 110.4468. Simulation results for the servo behavior of the FLC-PI-D using IHS for the pH neutralization system are shown in Figure 6.

Table 1 Convergence of HS and IHS to optimize the FLC-PI-D (30 runs)

Optimization Algorithm

Maximum J Mean J Minimum J Standard Deviation of J

HS 100.9286 90.3335 81.9827 5.1149 IHS 110.4468 93.9736 85.8320 6.9594

Page 92: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

86 L. dos Santos Coelho and D.L. de A. Bernert

Table 2 Best results of FLC-PI-D and performance data in closed-loop system

Parameter HS IHS Ke 0.8514 0.3165 K∆e -44.1318 -34.5754 Kc 1.2093 0.8078 KD -0.0999 -0.0917

Mean of error signal 0.2403 0.2167 Variance of control signal 1.2742 0.7535

Objective function, J 100.9286 110.4468

0 50 100 150 200 250 3000

2

4

6

8

10

12

14

sample

outp

ut

output signalreference signal

(a) output

0 50 100 150 200 250 3000

0.5

1

1.5

2

2.5

3

3.5

cont

rol s

igna

l

sample

(b) control signal

Fig. 6 Best result of servo behavior using FLC-PI-D with IHS

Page 93: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search Approach Using Exponential Probability Distribution 87

5 Conclusions and Future Research

This chapter presented the development of an IHS algorithm to the FLC-PI-D de-sign. The effectiveness of the proposed control schemes was shown in simulations of a pH neutralization system. The utilization of HS and IHS approaches avoids the tedious manual trial-and-error procedure and it presents robustness in tuning of FLC-PI-D design parameters.

The IHS method proposed in this study presents some promising features. Pa-rametric uncertainties affect the closed loop system dynamics. However, the effec-tiveness of the proposed FLC-PI-D strategy using IHS is corroborated in Figure 6.

The aim of future works includes investigating the use of IHS for FLC-PI-D tuning applied to multivariable nonlinear processes.

References

1. Ahn, K.K., Truong, D.Q.: Online tuning fuzzy PID controller using robust extended Kalman filter. Journal of Process Control 19, 1011–1023 (2009)

2. Feng, G.: A survey on analysis and design of model-based fuzzy control systems. IEEE Transactions on Fuzz Systems 14, 676–697 (2006)

3. Mohan, B.M., Sinha, A.: Analytical structure and stability analysis of a fuzzy PID con-troller. Applied Soft Computing 8, 749–758 (2008)

4. Wang, L., Du, W., Wang, H., Wu, H.: Fuzzy self-tuning PID control of the operation temperatures in a two-staged membrane separation process. Journal of Natural Gas Chemistry 17, 409–414 (2008)

5. Li, H.X., Gatland, H.B.: Enhanced methods of fuzzy logic control. In: Proceedings of FUZZ-IEEE/IFES, Yokohama, Japan, vol. 1, pp. 331–336 (1995)

6. Fadaei, A., Salahshoor, K.: Design and implementation of a new fuzzy PID controller for networked control systems. ISA Transactions 47, 351–361 (2008)

7. Golob, M.: Decomposed fuzzy proportional-integral-derivative controllers. Applied Soft Computing 1, 201–214 (2001)

8. Kwok, D.P., Tam, P., Li, C.K., Wang, P.: Linguistic PID controllers. In: Proceedings of 11th World Congress of IFAC, Tallin, Estonia, USSR, vol. 7, pp. 192–197 (1990)

9. Lan, L.H.: Stability analysis for a class of Takagi–Sugeno fuzzy control systems with PID controllers. International Journal of Approximate Reasoning 46, 109–119 (2007)

10. Li, Y., Ng, K.C.: Reduced rule-base and direct implementation of fuzzy logic control. In: Proceedings of 13th World Congress of IFAC, San Francisco, CA, USA, pp. 85–90 (1997)

11. Mann, G.K.I., Hu, B.G., Gosine, R.G.: Analysis of direct action fuzzy PID controller structures. IEEE Transactions on Systems, Man, and Cybernetics — Part B: Cybernet-ics 29, 371–388 (1999)

12. Shayeghi, H., Shayanfar, H.A., Jalili, A.: Multi-stage fuzzy PID power system auto-matic generation controller in deregulared environments. Energy Conversion and Management 47, 2829–2845 (2006)

13. Soyguder, S., Karakose, M., Alli, H.: Design and simulation of self-tuning PID-type fuzzy adaptive control for an expert HVAC system. Expert Systems with Applica-tions 36, 4566–4573 (2009)

Page 94: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

88 L. dos Santos Coelho and D.L. de A. Bernert

14. Bagis, A., Karaboga, D.: Evolutionary algorithm-based fuzzy PD control of spillway gates of dams. Journal of the Franklin Institute 344, 1039–1055 (2007)

15. Chou, C.H.: Genetic algorithm-based optimal fuzzy controller design in the linguistic space. IEEE Transactions on Fuzzy Systems 14, 372–395 (2006)

16. Cordón, O., Gomide, F., Herrera, F., Hoffmann, F.: Magdalena Ten years of genetic fuzzy systems: current framework and new trends. Fuzzy Sets and Systems 141, 5–31 (2004)

17. Marseguerra, M., Zio, E., Cadini, F.: Genetic algorithm optimization of a model-free fuzzy control system. Annals of Nuclear Energy 32, 712–728 (2005)

18. Mucientes, M., Moreno, D.L., Bugarín, A., Barro, S.: Design of a fuzzy controller in mobile robotics using genetic algorithms. Applied Soft Computing 7, 540–546 (2007)

19. Wu, C.J., Liu, G.Y.: A genetic approach for simultaneous design of membership func-tions and fuzzy control rules. Journal of Intelligent and Robotic Systems 28, 195–211 (2000)

20. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76(2), 60–68 (2001)

21. Saka, M.P.: Optimum design of steel sway frames to BS5950 using harmony search algorithm. Journal of Constructional Steel Research 65, 36–43 (2009)

22. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338–353 (1965) 23. Coelho, L.S., Coelho, A.A.R.: Fuzzy PID controllers: structures, design principles and

application for nonlinear practical process. In: Roy, R., Furushashi, T., Chawdhry, K. (eds.) Advances in Soft Computing – Engineering Design and Manufacturing, pp. 147–159. Springer, London (1999)

24. Mamdani, E., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logic controller. International Journal on Man Machine Studies 7, 1–13 (1975)

25. Takagi, T., Sugeno, M.: Fuzzy identification of systems and its applications to model-ing and control. IEEE Transactions on Systems, Man, and Cybernetics 15, 116–132 (1985)

26. Qin, S.J.: Auto-tuned fuzzy logic control. In: Proceedings of the American Control Conference, Baltimore, Maryland, USA, pp. 2465–2469 (1994)

27. Coelho, L.S., Bernert, D.L.A.: An improved harmony search algorithm for synchroni-zation of discrete-time chaotic systems. Chaos, Solitons & Fractals 41, 2526–2532 (2009)

28. Coelho, L.S., Alotto, P.: Global optimization of electromagnetic devices using an ex-ponential quantum-behaved particle swarm optimizer. IEEE Transactions on Magnet-ics 44, 1074–1077 (2008)

29. Krohling, R.A., Coelho, L.S.: PSO-E: Particle swarm with exponential distribution. In: Proceedings of IEEE Congress on Evolutionary Computation (CEC 2006), pp. 5577–5582 (2006)

30. Narihisa, H., Taniguchi, T., Ohta, M., Katayama, K.: Exponential evolutionary pro-gramming without self-adaptive strategy parameter. In: Proceedings of IEEE Congress on Evolutionary Computations, pp. 544–551 (2006)

31. Logghe, D., Wang, H.: Modelling a non-linear pH process via the use of B-splines neural network. In: Proceedings of the IEEE International Conference on Control Ap-plications (1997)

Page 95: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 89–98. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Hybrid Taguchi-Harmony Search Approach for Shape Optimization

Ali Rıza Yildiz and Ferruh Öztürk*

Abstract. Harmony search algorithms have recently gained a lot of attention from the optimization research community. In this chater, a new optimization approach based on harmony search algorithm and Taguchi’s method is presented to solve shape optimization problems. The validity and efficiency of the proposed ap-proach are evaluated in an optimum design problem of a vehicle component by il-lustrating how the present approach can be applied for solving shape optimization problems. The first application of harmony search algorithm to the shape optimization problems in the literature is presented in this chapter. The results of the shape optimization problem indicate that the proposed approach is highly competitive and it can be considered as a viable alternative in solving real-world optimization problems, finding beter solutions compared to other approaches that are representative of the state-of-the-art in the optimization literature.

1 Introduction

Structural optimization has gain a lot of attention due to its great contribution to cost, material and time savings in the procedures of the engineering design. Topology and shape optimization have deserved great attentions in terms of its important purpose and inherent difficulties. Shape optimization is becoming more important as industry attempts to optimize (minimize or maximize) objective functions while still maintaining a sufficiently strong and safe design. The goal of shape optimization is to find the optimal shape of a continuum medium to maximize or minimize an objective function such as minimizing the weight or maximizing the stiffness of the structure, subjected to the stress or displacement constraint conditions.

Since classical optimization methods are not only time consuming in solving complex nature problems but also they may not be used efficiently in finding global or near global optimum solutions, it is difficult to design the best product Ali Rıza Yildiz and Ferruh Öztürk Mechanical Engineering Department, Uludag University, Bursa, Turkey Email: {aliriza,fozturk}@uludag.edu.tr

Page 96: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

90 A.R. Yildiz and F. Öztürk

by classical optimization methods. The increasing demand to lightweight and low-cost structures has forced researchers to develop new approaches. Recent ad-vancements in optimization area introduced new opportunities to achieve better solutions for shape design optimization problems. Therefore, there is a need to de-velop new methods to overcome drawbacks and to improve the existing optimiza-tion techniques to design products economically.

Since the heuristic search techniques such as genetic algorithm, simulated an-nealing, ant colony algorithm, particle swarm optimization, immune algorithm and harmony search algorithm are more effective than the gradient techniques in finding the global minimum, they have been widely applied in various fields of science [1-19]. A detailed review of these algorithms as well as their applications in the optimum structural design can be found in [9, 18].

Fast convergence speed and robustness in finding the global minimum are not easily achieved at the same time. Fast convergence requires a minimum number of calculations, increasing the probability of missing important points; on the other hand, the evaluation of more points for finding the global minimum decreases the convergence speed. This leads to the question: ‘how to obtain both fast conver-gence speed and global search capability at the same time’. There have been a number of attempts to answer this question, while hybrid algorithms have shown outstanding reliability and efficiency in application to the engineering optimiza-tion problems [19-27]. Therefore, researchers are paying great attention on hybrid approaches to answer this question, particularly to avoid premature convergence towards local minima and to reach the global optimum results.

Although some improvements regarding shape design optimization issues are achieved, the complexity of design problems presents shortcomings. A new hybrid approach based on robustness issues are used to help better harmony search algo-rithm. It has been aimed to reach optimum designs by using Taguchi’s robust parameter design approach coupled with harmony search algorithm. In this new hybrid approach, S/N values are calculated and ANOVA (analysis of variance) table for objective function(s) is formed using S/N ratios. According to results of ANOVA table, appropriate interval levels of design parameters are found and then, initial harmony memory is defined according to these interval levels. Then, optimum results of design optimization problem are obtained using the harmony search algorithm.

The new hybrid optimization approach is applied to a shape optimization prob-lem taken from automotive industry to demonstrate the application of the present approach to real-world shape design optimization problems.

2 Global Optimization by Hybridization

Optimization problems have objective function(s) and constraints that must be sat-isfied at the same time. A general mathematical model of constrained optimiza-tion problems can be defined as follows [28]:

Page 97: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Hybrid Taguchi-Harmony Search Approach for Shape Optimization 91

Minimize/Maximize fm(x), m = 1,2,..., M (1)

Subject to gj (x) ≥ 0, j = 1,2,..., J (2)

hk(x) =0, k = 1,2,..., K (3)

xi(L) ≤ xi ≤ xi

(U), i = 1,2,..., n (4)

A solution x is a vector of n decision variables: x = (x1, x2,…,xn)T. Each deci-

sion variable xi takes a value between a lower xi(L) and an upper xi

(U) bound. These bounds define decision variable space. In this mathematical model gj (x) and hk(x) define inequality and equality constraints, respectively. Objective function(s) f(x) = (f1(x), f2(x),…, fM(x))T can be either minimized or maximized. The problem is to find optimum variables that satisfy the constraints given by (2) and (3).

A larger population makes the algorithm more likely to find good solutions, but also increases computing time taken by the algorithm. The problem with larger population is to tend to converge and stick around certain solutions; therefore, there is a need to define the efficient size of population to efficiently have global optimal results. This shortcoming is eliminated by introducing Taguchi-based ini-tial harmony memory.

2.1 Harmony Search Algorithm

The harmony search (HS) algorithm was recently developed in an analogy with music improvisation process where music players improvise the pitches of their instruments to obtain better harmony [14]. The working principle of the HS algo-rithm is very different from classical optimization techniques. The HS algorithm uses a random search, which is based on random selection, memory consideration, and pitch adjustmenting. It has been successfully applied to various benchmark and real-world problems [14-20]. The steps in the procedure of harmony search are as follows:

• Step 1: Initialize the problem and algorithm parameters. • Step 2: Initialize the harmony memory. • Step 3: Improvise a new harmony. • Step 4: Update the harmony memory. • Step 5: Check the stopping criterion.

For further details about these steps, various HS algorithm structures can be

found from Geem [17].

Page 98: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

92 A.R. Yildiz and F. Öztürk

2.2 Taguchi Method

Taguchi method chooses the most suitable combination of the levels of controlla-ble factors by using S/N table and orthogonal arrays against the factors that form the variation and are uncontrollable in product and process. Hence, it tries to reduce the variation in product and process to the least. Taguchi uses statistical performance measure which is known as S/N ratio that takes both medium and variation into consideration [29].

HARMONY SEARCHALGORITHM

Finite element analysis

Initial memory range for search space

Optimum settings of design variables

Initialize the harmony memory

Improvise a new harmony

Update harmony memory

TAGUCHI’S METHOD

Define design variables and matrix of experiments

Compute S/N ratios and conduct ANOVA analysis

Determine optimum levels of design variables

Check stopping criterion

Fig. 1 Hybrid harmony search algorithm based shape optimization approach

Most of the shape optimization problems in industry have uncontrollable varia-

tions in their design parameters. There is a need to overcome the shortcomings due to the traditional optimization methods and also to further improve the strength of recent approaches to achieve better results for the real-world design optimization problems. Therefore, in this chapter, a hybrid approach for shape optimization is proposed based on Taguchi’s method and HS algorithm. The architecture of pro-posed hybrid approach is given in Figure 1. Although the HS algorithm has been used for different optimization studies, it has not been used for shape optimization up to now in literature. For the first time in the literature, HS algorithm and hybrid HS are used for shape optimization.

Page 99: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Hybrid Taguchi-Harmony Search Approach for Shape Optimization 93

Taguchi’s method is introduced to help to define robust initial population levels of design parameters and to reduce the effects of noise factors to achieve better initial harmony memory. The problem with larger population is to tend to con-verge and stick around certain solutions which may not be the best one. This is handled with the help of robust parameter levels which are embedded into HS al-gorithm as being initial population intervals. In other words, the design space is restricted and refined based on the effect of the various design variables on objec-tive function(s). The purpose of the ANOVA tables is to help differentiate the ro-bust designs from the non-robust ones.

Finally, optimum results of shape optimization problem are obtained by apply-ing HS algorithm. The present approach is considered in two stages as follows: 1) determine efficient solution space using Taguchi’s method, and 2) apply HS to find optimal solution set of design variables.

In the first stage, Taguchi’s robust parameter design procedure is used to find the levels of variables for efficient search space as follows:

• Identify the objectives, constraints and design parameters. • Determine the settings of the design parameter levels. • Conduct the experiments using orthogonal array. • Compute S/N ratios and ANOVA analysis. • Find the optimal settings of design parameters.

The main issue of experimental analysis is ANOVA analysis which is formed

using S/N ratios for objective function(s). According to results of ANOVA, ap-propriate levels of design parameters are found, and then initial population of HS is defined according to the levels.

Finally, optimum results of the problem are obtained by applying HS algorithm as follows:

• Define initial harmony memory. • Use algorithm operators to improvise a new harmony. • Update harmony memory. • Repeat the loop until the optimum shape is generated.

The trend in the research area of optimization is to improve the efficiency of

algorithms. In this chapter, a new hybrid approach is proposed to improve the per-formance of the HS algorithm. The argument behind the proposed approach is that the strength of one algorithm can be used to improve the performance of another approach in the optimization process. The proposed hybrid approach is one of the first attempts to use Taguchi’s method to define the ranges of initial population space for the HS algorithm to solve shape optimization problems. The combina-tion of Taguchi’s method and HS algorithm is resulted in a solution, which leads to better parameter values for shape optimization problems. The algorithm of the proposed hybrid approach can be outlined as follows:

Page 100: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

94 A.R. Yildiz and F. Öztürk

BEGIN Step 1: Taguchi method

Begin Choose convenient orthogonal array from Taguchi’s orthogonal arrays.

Define levels and intervals For i:=1 to NOE (number of experiments) do begin Compute objective function values end;

Choose convenient S/N ratio type based on objective function(s) For i:=1 to NOE do begin Compute S/N ratios end;

Constitute ANOVA table for objective functions using S/N ratios Determine optimum levels and intervals using ANOVA table

Use these levels and intervals for forming initial population end; Begin Input

Step 2: Harmony search algorithm Initialize the problem and algorithm parameters. Initialize the harmony memory. Improvise a new harmony. Update the harmony memory. Check the stopping criterion.

end; END

3 Shape Optimization of Vehicle Component

In this section, the proposed approach is applied to the optimal shape design of a vehicle part taken from automotive industry. The objective functions are due to the volume and the frequency of the part which is to be designed for minimum volume and avoiding critical frequency subject to strength constraints. In the first stage, the experiments are designed to evaluate the effects of four design variables related to objective functions. The four shape design variables x1, x2, x3 and x4 are selected as shown in Fig. 2. The feasible range of design variables without shape distortions is considered as 6 < x1 < 30; 21 < x2 < 27; 8 < x3 < 14; and 28 < x4 < 46.

Matrix experiments are designed using L16 orthogonal arrays and S/N ratios are conducted for each objective. Smaller the better and larger the better characteris-tics are applied to compute S/N ratios based on each objective as smaller the better for volume and compliance. The details about orthogonal array, S/N ratios, ANOVA analysis, and how they are computed and used for experimental evalua-tions are given in the reference of Phadke [29].

The parameter levels are taken as x1 = 30; 21 < x2 <27; 8 < x3 < 14; and 28 < x4 < 46, which are obtained from ANOVA analysis. More detailed explanation on

Page 101: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Hybrid Taguchi-Harmony Search Approach for Shape Optimization 95

Fig. 2 Design variables

Table 1 Comparison of the optimization results for the side door bracket design

Volume (cm3)

Frequency (Hertz)

Stress (MPa)

Initial design 20,727.2 8.3 256

CAD optimum design 18,763.9 8.1 277

Genetic Algorithm 17,663 8.8 293

Hybrid GA [1] 16,754 9.3 291

HSA 16,981 8.9 294

HTHSA 16,416 9.36 298

ANOVA analysis of parameter levels for the shape design optimization problem can be obtained from [1].

The HS algorithm begins its search with harmony memory (HM) range defined by Taguchi’s method. Then, a new harmony is generated from the HM based on memory considerations, pitch adjustments, and randomization. If the new harmony vector is better than the worst harmony in the HM in terms of the objective function value, the new harmony is included in the HM and the existing worst harmony is excluded from the HM. The HM is then sorted by the objective function value. The computations are terminated when the termination criterion (optimal design) is satisfied.

The results of hybrid Taguchi harmony search approach (HTHSA) for the de-sign of the vehicle part are given in Table 1. It is clearly seen that shape design op-timization performance is improved compared to traditional CAD and GA, hybrid

X4

X2

X3 X1

Page 102: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

96 A.R. Yildiz and F. Öztürk

GA and original HS. ANSYS is used for CAD optimization process. The intervals of design variables are considered as 6 < x1 < 30; 21 < x2 < 27; 8 < x3 < 14; and 28 < x4 < 46. The structural layout results of the present hybrid approach are given in Fig. 3.

Fig. 3 Optimal structural layout

4 Conclusions

This research describes a new optimization approach based on HS algorithm and Taguchi’s robust design approach for solving shape design optimization problems. Taguchi’s robust design approach is introduced to help in defining robust initial population levels of design parameters to achieve better initial HM. The design so-lution space of HS is refined based on the effect of the various design variables on objective functions. The HTHSA is applied to shape optimization of a vehicle component taken from automotive industry. It is seen that better results can be achieved with present hybrid optimization approach. Therefore, HTHSA is a suit-able optimization technique for the solution of shape design optimization prob-lems. Since HTHSA is a generalized optimization method, it can also be applied to other real-world optimization problems.

Further research can be carried out to improve the proposed approach by integrating the key issues from the fields of multi-objective optimization, heuristic algorithms and local search techniques. Now, as further research, the authors consider hybridizing of HTHSA by local search techniques like hill-climbing to extend its improvements for solving shape design optimization problems.

References

1. Yildiz, A.R., Ozturk, N., Kaya, N., Ozturk, F.: Hybrid multi-objective shape design optimization using Taguchi’s method and genetic algorithm. Structural and Multidisci-plinary Optimization 34, 317–332 (2007)

Page 103: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Hybrid Taguchi-Harmony Search Approach for Shape Optimization 97

2. Dereli, T., Filiz, I.H., Baykasoglu, A.: Optimizing cutting parameters in process plan-ning of prismatic parts by using genetic algorithms. International Journal of Production Research 39, 3303–3328 (2001)

3. Yildiz, A.R., Saitou, K.: Topology Synthesis of Multi-Component Structural Assembly in Continuum Domain. In: Proceedings of ASME International Design Engineering Technical Conferences, New York, USA, pp. 3–6 (2008)

4. Colorni, A., Dorigo, M., Maniezzo, V.: Distributed optimization by ant colony. In: Proceedings of 1st European Conference on Artificial Life, pp. 134–142 (1991)

5. Woon, S.Y., Querin, O.M., Steven, G.P.: Structural application of a shape optimization method based on a genetic algorithm. Structural and Multidisciplinary Optimiza-tion 22, 57–64 (2001)

6. Liu, B., Haftka, R.T., Akgun, M.A., Todoroki, A.: Permutation genetic algorithm for stacking sequence design of composite laminates. Computer Methods in Applied Me-chanics and Engineering 186, 357–372 (2000)

7. Yildiz, A.R., Kaya, N., Alankus, O.B., Ozturk, F.: Optimal design of vehicle compo-nents using topology design and optimization. International Journal of Vehicle De-sign 34, 387–398 (2004)

8. Geem, Z.W.: Optimal cost design of water distribution networks using harmony search. Engineering Optimization 38, 259–280 (2006)

9. Saka, M.P.: Optimum design of steel frames using stochastic search techniques based on natural phenomena: a review. In: Topping, B.H.V. (ed.) Civil engineering computa-tions: tools and techniques, pp. 105–147. Saxe-Coburgh Publications (2007)

10. Sonmez, O.F.: Shape optimization of 2D structures using simulated annealing. Com-puter Methods in Applied Mechanics and Engineering 196, 279–329 (2007)

11. Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P.: Optimization by simulated annealing. Sci-ence 220, 671–680 (1983)

12. Eberhart, R., Kennedy, J.: A new optimizer using particle swarm theory. In: Proceed-ings of IEEE Sixth International Symposium on Micro Machine Human Science. Na-goya, Japan, pp. 39–43 (1995)

13. Fourie, P.C., Groenwold, A.A.: The particle swarm optimization algorithm in size shape optimization. Structural and Multidisciplinary Optimization 23, 259–267 (2002)

14. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001)

15. Lee, K.S., Geem, Z.W.: A new structural optimization method based on the harmony search algorithm. Computers & Structures 82, 781–798 (2004)

16. Lee, K.S., Geem, Z.W.: A new meta-heuristic algorithm for continues engineering op-timization: harmony search theory and practice. Computer Methods in Applied Me-chanics and Engineering 194, 3902–3933 (2004)

17. Geem, Z.W.: Music-inspired harmony search algorithm: theory and applications. Springer, Berlin (2009)

18. Hasancebi, O., Carbas, S., Dogan, E., Erdal, F., Saka, M.P.: Performance evaluation of metaheuristic search techniques in the optimum design of real size pin jointed struc-tures. Computers and Structures 87, 284–302 (2009)

19. Saka, M.P.: Optimum design of steel sway frames to BS 5950 using harmony search algorithm. Journal of Constructional Steel Research 65, 36–43 (2009)

20. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

Page 104: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

98 A.R. Yildiz and F. Öztürk

21. Yildiz, A.R.: A novel hybrid immune algorithm for global optimization in design and manufacturing. Robotics and Computer Integrated Manufacturing 25, 261–270 (2009)

22. Yıldız, A.R.: A novel particle swarm optimization approach for product design and manufacturing. International Journal of Advanced Manufacturıng Technology 40, 617–628 (2009)

23. Yildiz, A.R.: Hybrid immune-simulated annealing algorithm for optimal design and manufacturing. International Journal of Materials and Product Technology 34, 217–226 (2009)

24. Fesanghary, M., Mahdavi, M., Minary-Jolandan, M., et al.: Hybridizing harmony search algorithm with sequential quadratic programming for engineering optimization problems. Computer Methods in Applied Mechanics and Engineering 197, 3080–3091 (2008)

25. Fan, S.S.K., Liang, Y.C., Zahara, E.: Hybrid simplex search particle swarm optimiza-tion for the global optimization of multimodal functions. Engineering Optimization 36, 401–418 (2004)

26. Xia, W.J., Wu, Z.M.: A hybrid particle swarm optimization approach for the job-shop scheduling problem. International Journal Advanced Manufacturing Technology 29, 360–366 (2006)

27. Rajasekaran, S., Lavanya, S.: Hybridization of genetic algorithm with immune system for optimization problems in structural engineering. Structural and Multidisciplinary Optimization 34, 415–429 (2007)

28. Deb, K.: Multiobjective Optimization Using Evolutionary Algorithms. Wiley, Chich-ester (2001)

29. Phadke, S.M.: Introduction to quality engineering, Asian Productivity Organization (1989)

Page 105: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 99–109. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

An Introduction to the Hybrid HS-SQP Method and Its Applications

Mohammad Fesanghary*

Abstract. This chapter aims to present recent developments and applications concerning optimization with the hybrid HS-SQP method. This method has been successfully utilized in several engineering applications. In addition to the introduction of the concept of HS-SQP method, this chapter also presents some selected representative case studies covering synthesis of cost-optimal heat exchanger networks and economic utilization of electric power systems.

1 Introduction

Evolutionary algorithms (EAs) have been widely used in science and engineering for solving complex problems. In general, these methods are good at finding the promising regions of search space. Also, initial configuration has no effect on the solution of these methods. However, the drawback of these methods is their slowness.

On the other hand, gradient based algorithms are very effective in performing local search. In general, gradient based algorithms converge faster and they can obtain solutions with higher accuracy compared to evolutionary approaches. However, these approaches often rely deeply on the initial starting point. A good starting point is vital for these methods to be executed effectively.

To obtain a more efficient optimization technique, it is common to combine different search strategies trying to compensate deficiencies of the individual algorithms. During the last few years, new methods have been developed in order to improve the lack of accuracy of the EAs, using local optimization algorithms. These techniques are based on combination of local search methods, which are good at finding local optima (local exploiter), and global search methods (global explorer). These methods are commonly known as hybrid algorithms and have been successfully used to solve a wide variety of problems. The studies show that hybrid methods can search more efficiently and can often find better solutions [1-6]. Mohammad Fesanghary Department of Mechanical Engineering, Louisiana State University, Baton Rouge, LA 70802, USA E-mail: [email protected]

Page 106: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

100 M. Fesanghary

The need for developing powerful and efficient hybrid optimization methods is the subject of intensive research. In this context, the newly developed hybrid HS-SQP method [7] is introduced in this chapter. The rest of this chapter is organized as follows: first a brief review of the hybrid HS-SQP method is given and then to show the effectiveness of the HS-SQP for practical applications, three case studies are considered.

2 Hybrid HS-SQP Method

The hybrid HS-SQP method uses the harmony search (HS) for finding optimal regions and the SQP method for fine tuning the HS solutions. Therefore, this algorithm increases the possibility of finding the global optimal point and improves the convergence speed. In the following subsections the main concepts of HS-SQP method will be introduced.

2.1 Combination Strategies

The particular combination is important in terms of possible solution quality and computational efficiency. The right balance between the local exploitation and global exploration should be found. Two different combination strategies can be used here; in the first strategy the HS performs a coarse search in the first stage. When the HS is completed or shows a negligible trend of improvement after many iterations, the SQP begins its task and uses the best vector from the harmony memory (HM) as its starting point. In the second strategy both methods are simultaneously run; all new improvised vectors are continuously used as initial values for the SQP method. If the locally optimized vectors have a better fitness value than those in the HM, they will be re-implanted into the HM.

2.2 Resource Allocation and Computational Time

In order to obtain a high quality solution with minimum resource requirement, the two above mentioned strategies are combined with a probability of Pc. In this way the SQP method is integrated into the HS as illustrated in Fig. 1. For instance, in each iteration, with probability equal to Pc, the SQP which uses the new improvised vector as its starting point is applied. The HM is updated if the locally optimized vector has better fitness value than those in the HM. Finally, after the specified termination criteria for the HS are reached, the SQP is then applied using the best solution obtained by the HS.

In order to further improve the performance of the hybrid algorithm, the computation time spent by the HS and SQP should be adjusted. In many problems, it is not efficient to carry out a local optimization algorithm for every solution vector due to the dimensions of the search space and limitations of computational resources. This is especially important when the local search algorithm has a high

Page 107: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Introduction to the Hybrid HS-SQP Method and Its Applications 101

computational cost. Therefore the SQP is applied to only a few solution vectors. In this strategy Pc controls the allocation of resources between the HS and the SQP. As Pc increases, the SQP consumes more time, but in general, the hybrid method is expected to produce better results. When Pc=1, the strategy is similar to the second hybrid strategy; and when Pc is zero, the strategy is similar to the first strategy. Based on author experience a fairly small value for Pc (e.g., Pc = 0.01 ~ 0.1) is recommended. One of the main advantages of this strategy is that the computational cost of applying the SQP to only a few solution vectors, hardly affects the total time spent by the HS-SQP algorithm.

procedure HS-SQP

Initiate_parameters() Initialize_HM() while (not_termination) for I = 1 to number of decision variables N do if ( rand() < PHMCR) /* (memory consideration) */ X[I] will be randomly chosen from harmony memory if ( rand() < PPAR) /* (pitch adjustment) */ X[I] = X[I] ± ∆ end if

else /* (random selection) */ X[I]= LBI + rand() *(UBI-LBI) end if end for if ( rand() < PC) /* local search using SQP */ Run SQP using X as starting point fitness_X=SQP(X) else fitness_X=evaluate_fitness(X) end if update_memory(X,fitness_X) /* if applicable */

end while fitness_X=SQP(Xbest) end procedure

Fig. 1. Pseudo code of the hybrid algorithm

2.3 Case Study 1

The objective is to find the minimum fabricating cost of the welded beam subject to constraints on shear stress, bending stress, buckling load, end deflection and side constraint. There are four design variables: h, l, t and b. The schematic of the beam is shown in Fig. 2.

Page 108: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

102 M. Fesanghary

Fig. 2 Schematic of welded beam

This problem has been solved using a variety of evolutionary and traditional mathematical programming methods including: GA [8, 9], APPROX (Griffith and Stewart’s successive linear approximation) [10], DFP [10], SIMPLEX [10], HS [11] and improved harmony search (IHS) [12]. The optimization results are shown in Table 1. In this case the HS-SQP [7] is at least three times faster than IHS. As can be seen the HS-SQP has the best performance among these methods.

Table 1 Optimal results for case study 1

Optimal design variables Method H l t b

cost

GA[8] 0.2088 3.4205 8.9975 0.2100 1.7483 HS[11] 0.2442 6.2231 8.2915 0.2443 2.3807 APPROX[10] 0.2444 6.2189 8.2915 0.2444 2.3815 DFP[10] 0.2434 6.2552 8.2915 0.2444 2.3841 Simplex[10] 0.2792 5.6256 7.7512 0.2796 2.5307 GA[9] 0.2489 6.1730 8.1789 0.2533 2.4328 IHS[12] 0.20573 3.47049 9.03662 0.20573 1.7248 HS-SQP[7] 0.20572 3.47060 9.03682 0.20572 1.7248

3 Economic Power Dispatch

Economic dispatch (EP) is considered to be one of the key functions in electric power system operation. The ED problem is commonly formulated as an optimization problem aimed to minimize the total generation cost of units, while satisfying generation/network constraints.

In the past two decades various linear and nonlinear programming methods [13-20] have been used to solve ED problems. In general, compared to stochastic approaches, the gradient-based methods converge faster and can obtain solutions with higher accuracy. However, since these methods use gradient information, the variables and cost function of the generators need to be continuous. Furthermore, a

Page 109: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Introduction to the Hybrid HS-SQP Method and Its Applications 103

good starting point is crucial for these methods to execute successfully. However, realistic ED formulations result in non-convex optimization problems, which are challenging for traditional mathematical programming methods. Recently, as an alternative to the conventional mathematical approaches, the evolutionary optimi-zation methods such as genetic algorithms (GAs) [21], tabu search [22], ant colony (AC) [23], harmony search [24], evolutionary programming (EP) [25], particle swarm optimization (PSO) [26] and differential evolution (DE) [27] have been used to obtain global or near global optimum solutions for ED problems. These methods are effective for global searching and also, limitations regarding the form of the cost functions employed and the continuity of variables used for the mathematical optimization methods can be completely eliminated. However the convergence speed of these methods is not satisfying in some cases. This section focuses on the application of the HS-SQP algorithm for solving ED problems, aiming to show the efficiency of this method for practical ED applications.

3.1 Problem Formulation

To simplify the optimization problem and facilitate the application of classical techniques, cost functions of generators are typically modeled by smooth quadratic function form given as,

( )∑=

++=n

iiiiiiT PcPbaC

1

2 (1)

where CT is the total generation cost; n is the total number of generating units; ai, bi and ci are the cost coefficients of the ith unit; and Pi is the actual power output of the ith unit.

To model a more realistic cost function of generators, the valve-point effects need to be considered. To model the valve-point effects a recurring rectified sinusoidal term is added to Eq. (1) as follows:

( )( )2 min

1

sinn

T i i i i i i i i i

i

C a b P c P d f P Pα=

⎡ ⎤= + + + −⎢ ⎥⎣ ⎦∑ (2)

where di and fi are some constant coefficients; and miniP is the lower generation

limit of the ith unit. Generally, the ED problems are subjected to various constraints including:

power balance, generation limit, maximum line flow, prohibited operating zones and ramp-rate limits.

3.2 Case Study 2

The system contains 6 thermal generation units. All units have prohibited operating zones and ramp-rate limits. The characteristics of the generation units and constraints are given in [28]. The load demand is 1263MW.

Page 110: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

104 M. Fesanghary

Table 2 Results of case study 2

Method power output (MW) GA PSO ESO DE HS HS-SQP

P1 474.81 447.50 451.56 447.74 449.381 447.496 P2 178.64 173.32 173.44 173.41 173.530 173.314 P3 262.21 263.48 263.99 263.41 263.524 263.445 P4 134.28 139.06 147.46 139.08 132.049 139.055 P5 151.90 165.48 164.68 165.36 167.262 165.475 P6 74.18 87.13 71.32 86.94 90.262 87.125

Total 1276.03 1275.96 1272.46 1275.95 1276.01 1275.91

Ploss 13.02 12.96 12.82 12.96 13.08 12.95

Table 2 presents the best obtained solution using the HS-SQP [28] method and

compares the results with those obtained from GA [29], ESO [30], DE [27], and PSO [26]. It is observed that the HS-SQP method performs better than the other methods both in terms of the solution quality and convergence characteristics. Table 3 shows the robustness analysis of the methods for 100 independent runs. In general it can be concluded that the obtained solutions are similar in this case and the difference of the approaches lies in their convergence characteristics. Among these methods HS-SQP and DE shows more robustness in their convergence behaviors.

Table 3 Performance of different algorithms in 100 trial tests

Generation cost ($) Method

Max. Min Average CPU time (s)

GA 15524 15459 15469 41.58* PSO 15492 15450 15454 14.86* ESO** 15470 15408 15430 0.360* DE 15450 15450 15450 0.033* HS-SQP 15453 15449 15450 0.14

* Results obtained from reference ** Power balance constraint is not satisfied

4 Heat Exchanger Network Synthesis

The proper synthesis of heat exchanger networks (HENs) is an important task in chemical engineering and can lead to considerable saving in energy consumption of process industries. Although several mathematical programming methods and stochastic methods have been developed for HEN synthesis problem during the last two decades, the complexity of the task reveals the need for developing efficient algorithms to precisely locate the optimum HEN topology. In this context, a novel hybrid approach which combines HS with SQP has been recently developed [31], aiming to provide a viable alternative for conventional HEN optimization methods.

Page 111: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Introduction to the Hybrid HS-SQP Method and Its Applications 105

4.1 Problem Statement The HEN synthesis problem can be stated as follows: Given are (a) a set of hot and cold process streams, their supply and target temperatures and their heat capacity flowrates; (b) a set of hot and cold utilities and their corresponding temperatures; (c) a minimum temperature approach; (d) the overall heat transfer coefficient of each potential match; and (e) a maximum number of units.

The objective is to find the heat exchangers configuration and their heat loads that provide the minimum annual cost of the network. For each HEN structure some equality and inequality constraints, such as overall heat balance for each process stream, the minimum temperature approach (∆Tmin) and mass conservation in branches, should be met.

4.2 Solution Methodology To decrease the complexity of the problem and to make an efficient use of the speed and local search characteristic of the mathematical methods, the HEN synthesis problem is divided into two main parts: (a) defining the structure of HEN and, (b) computing optimal exchanger loads and stream-split fractions for each generated network as shown in Fig. 3.

Fig. 3 The structure of the hybrid algorithm

Page 112: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

106 M. Fesanghary

The proper choice of optimization methodology for each part depends on the complexity of the problem which is studied. Recent work by Furman and Sahinidis [32] has shown that the problem of finding the optimum HEN structure is a NP-hard problem. This limits the usefulness of deterministic methods in part (a) since their computation time increases exponentially with problem size. It is known that meta-heuristic optimization techniques are effective in providing good solutions for problems classified as NP-hard. Thus, HS is employed to carry out the structural optimization of HENs.

In part (b), the problem of finding optimum exchanger loads and stream-split fractions for a given HEN structure generally has continuous design variables with nonlinear objective function and constraints. Although both meta-heuristic and deterministic methods can be utilized for this part, the prime objective is to use a method with less computational time and high quality solutions. Therefore HS-SQP algorithm is used in part (b).

4.3 Case Study 3

The example presented by Yee and Grossmann [33] is considered as a third case study. This problem consists of five hot streams and one cold stream. No branches on the hot streams are permitted and ∆Tmin is 10 K for this problem.

The results obtained using the hybrid methodology is presented in Table 4 and also shown in Fig. 4. The total annual cost for this configuration is $572,476 which is less than those obtained by MINLP methods [33, 34] and also a GA based method [35]. Note that this configuration has 8 units which mean a simpler unit with less complexity and piping prices.

Fig. 4 Optimal HEN structure for case study 3

Page 113: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Introduction to the Hybrid HS-SQP Method and Its Applications 107

Table 4 Optimal results for case study 3

Method Units QH (kW) QC (kW) Annual Cost

MINLP [33] 9 3530 70 $575,595

MINLP[34] 7 3676 216 $576,640

GA-Simplex [35] 9 3620 160 $573,205

HS & HS-SQP[31] 8 3567 107 $572,476

5 Conclusions

The ability of the HS-SQP algorithm was demonstrated using several test problems and its performance was compared with other conventional methods. Three types of engineering optimization problems were studied in this chapter. The first type is related to the design optimization of structures. The second type concerns the economic utilization of electric power systems, and the third deals with the synthesis of the heat exchanger networks. The results reveal that HS-SQP outperforms other approaches not only in terms of the quality of the obtained solutions but also in terms of the computational time.

Acknowledgments

The author would like to thank Rina Mascarenhas and M. Minary-Jolandan for their constructive comments and suggestions.

References

1. Moscato, P.: On evolution, search, optimization, genetic algorithms and martial arts: Towards memetic algorithms, Tech. Rep. 826. California Inst. Technol., Pasadena (1989)

2. Moscato, P., Cotta, C.: A gentle introduction to memetic algorithms. In: Glower, F., Kochenberger, G. (eds.) Handbook of Metaheuristics. Kluwer, Norwell (1999)

3. Bersini, H., Renders, B.: Hybridizing genetic algorithms with hill-climbing methods for global optimization: Two possible ways. In: Proc. IEEE Int. Symp. Evolutionary Computation, Orlando, FL (1994)

4. Merz, C.J.: A principal components approach to combining regression estimates. Mach. Learn. 36, 9–32 (1999)

5. He, J., Xu, J., Yao, X.: Solving equations by hybrid evolutionary computation techniques. IEEE Trans. Evol. Comput. 4, 295–304 (2000)

6. Sarker, R., Mohammadian, M., Yao, X. (eds.): Evolutionary Optimization. Kluwer, Norwell (2002)

Page 114: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

108 M. Fesanghary

7. Fesanghary, M., Mahdavi, M., Minary-Jolandan, M., Alizadeh, Y.: Hybridizing harmony search algorithm with sequential quadratic programming for engineering optimization problems. Computer Methods in Applied Mechanics and Engineering 197, 3080–3091 (2008)

8. Coello, C.A.C.: Use of a self-adaptive penalty approach for engineering optimization problems. Computers in Industry 41, 113–127 (2000)

9. Deb, K.: An efficient constraint handling method for genetic algorithms. Comput. Methods Appl. Mech. Engrg. 186, 311–338 (2000)

10. Ragsdell, K.M., Phillips, D.T.: Optimal design of a class of welded structures using geometric programming. ASME J. Engrg. Ind. Ser. B 98, 1021–1025 (1976)

11. Lee, K.S., Geem, Z.W.: A new meta-heuristic algorithm for continues engineering optimization: harmony search theory and practice. Comput. Methods Appl. Mech. Engrg. 194, 3902–3933 (2004)

12. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Appl. Math. Comput. 188, 1567–1579 (2007)

13. Lin, C.E., Chen, S.T., Huang, C.L.: A direct Newton-Raphson economic dispatch. IEEE Trans. Power Syst. 7, 1149–1154 (1992)

14. Lin, C.E., Viviani, G.L.: Hierarchical economic dispatch for piecewise quadratic cost functions. IEEE Trans. Power App. Syst. 103, 1170–1175 (1984)

15. Wood, A.J., Wollenberg, B.F.: Power generation, operation and control. Wiley, New York (1994)

16. Yang, H.T., Chen, S.L.: Incorporating a multi-criteria decision procedure into the combined dynamic programming/production simulation algorithm for generation expansion planning. IEEE Trans. Power Syst. 4, 165–175 (1989)

17. Granville, S.: Optimal reactive dispatch through interior point methods. IEEE Trans. Power Syst. 9, 136–146 (1994)

18. Chen, C.L., Wang, S.C.: Branch-and-bound scheduling for thermal generating units. IEEE Trans. Energy Convers. 8, 184–189 (1993)

19. Liang, Z.X., Glover, J.D.: A zoom feature for a dynamic programming solution to economic dispatch including transmission losses. IEEE Trans. Power Syst. 7, 544–550 (1992)

20. Papageorgiou, L.G., Fraga, E.S.: A mixed integer quadratic programming formulation for the economic dispatch of generators with operating zones. Electric Power Syst. Res. 77, 1292–1296 (2007)

21. Kuo, C.C.: A novel string structure for economic dispatch problems with practical constraints. Energy Convers. Manage. 49, 3571–3577 (2008)

22. Lin, W.M., Cheng, F.S., Tsay, M.T.: An improved tabu search for economic dispatch with multiple minima. IEEE Trans. Power Syst. 17, 108–112 (2002)

23. Song, Y.H., Chou, C.S.V., Min, Y.: Large-scale economic dispatch by artificial ant colony search algorithms. Electr. Mach. Power Syst. 27, 679–690 (1999)

24. Vasebi, A., Fesanghary, M., Bathaee, S.M.T.: Combined heat and power economic dispatch by harmony search algorithm. International Journal of Electrical Power & Energy Systems 29, 713–719 (2007)

25. Somasundaram, P., Kuppusamy, K., Kumudini Devi, R.P.: Economic dispatch with prohibited operating zones using fast computation evolutionary programming algorithm. Electr. Power Syst. Res. 70, 245–252 (2004)

26. Gaing, Z.L.: Particle swarm optimization to solving the economic dispatch considering the generator constraints. IEEE Trans. Power Syst. 18, 1187–1195 (2003)

Page 115: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Introduction to the Hybrid HS-SQP Method and Its Applications 109

27. Noman, N., Iba, H.: Differential evolution for economic load dispatch problems. Electr. Power Syst. Res. 78, 1322–1331 (2008)

28. Fesanghary, M., Ardehali, M.M.: A novel meta-heuristic optimization methodology for solving various types of economic dispatch problem. Energy 34, 757–766 (2009)

29. Yalcionoz, T., Altun, H., Uzam, M.: Economic dispatch solution using a genetic algorithm based on arithmetic crossover. In: Proc. IEEE Proto Power Tech. Conf., Proto, Portugal (2001)

30. Pereira-Neto, A., Unsihuay, C., Saavedra, O.R.: Efficient evolutionary strategy optimization procedure to solve the nonconvex economic dispatch problem with generator constraints. IEE Proc. Gener. Transm. Distrib. 152, 653–660 (2005)

31. Khorasany, R.M., Fesanghary, M.: A novel approach for synthesis of cost-optimal heat exchanger networks. Computers & Chemical Engineering 33, 1363–1370 (2009)

32. Furman, K.C., Sahinidis, N.V.: Computational complexity of heat exchanger network synthesis. Computers & Chemical Engineering 25, 1371–1390 (2001)

33. Yee, T.F., Grossmann, I.E., Kravanja, Z.: Simultaneous optimization models for heat integration–I. Area and energy targeting and modeling of multi-stream exchangers. Computers & Chemical Engineering 14, 1151–1164 (1990)

34. Yee, T.F., Grossmann, I.E.: Simultaneous optimization models for heat integration. II. Heat exchanger network synthesis. Computers & Chemical Engineering 14, 1165–1184 (1990)

35. Lewin, R.: A Generalized method for HEN synthesis using stochastic optimization. II. Synthesis of cost-optimal networks, Computers & Chemical Engineering 22, 1387–1405 (1998)

Page 116: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 111–122. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Solution of Groundwater Management Problems Using Harmony Search Algorithm

M. Tamer Ayvaz*

Abstract. Groundwater is not only an important component of water resources, but also a reliable source of fresh water for domestic and industrial uses. However, due to climate change and the fast population growth, the quality and quantity of groundwater resources have been continuously decreasing. Therefore, sustainable management strategies should be developed for groundwater systems by decision makers. This chapter provides a brief review dealing with the use of Harmony Search (HS) optimization algorithm for solving the groundwater management problems. Review results indicate that HS can successively solve the groundwater management problems and provides identical or better results than the other non-heuristic and heuristic optimization algorithms.

1 Introduction

Groundwater management becomes an important issue nowadays since the impor-tance of the groundwater resources has been continuously growing. Mathematical models are the necessary tools of modeling the groundwater systems for determin-ing the responses of the aquifer systems for different management alternatives. However, these models cannot be eligible to determine the best management al-ternative from the set of alternatives. Therefore, they are combined with optimiza-tion algorithms to solve the management problems. Note that the mathematical models and the optimization algorithms are combined through embedded and re-sponse matrix approaches. The solution of a management problem through em-bedded approach requires defining the solution of governing partial differential equations as a constraint set of the optimization model [1]. For each cycle of the optimization process, these equations are solved based on the management set de-fined by the optimization model. The key benefit of the embedded approach is that it always provides detailed information of hydraulic head distributions over the whole flow domain. However, its main drawback is that it requires high computa-tional times especially for the big flow domains [2]. In response matrix approach, M. Tamer Ayvaz Department of Civil Engineering, Pamukkale University, Denizli, Turkey E-mail: [email protected]

Page 117: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

112 M.T. Ayvaz

it is not required to define the solution of governing equations in the constraint set. Instead, an external mathematical model is used to determine the unit responses which describe the change of head values at selected observation locations due to a unit change in the pumping rates [2]. This approach works on the principles of superposition and usually faster than the embedded approach. However, its draw-back is that it cannot be used for the cases where system response is nonlinear. Besides, it provides less information about hydraulic head distribution over the flow field than embedded approach.

Groundwater management models may be mainly classified as the hydraulic and quality management models [3]. The typical problems of hydraulic manage-ment models are to maximize the total pumping from the aquifer system; or to minimize the total pumping cost for satisfying the given water demand [4]. On the other hand, the main objective of the quality management models is to solve the pollution source identification problems [5] or to determine the best remediation strategy to clean up the aquifer system [6]. In both hydraulic and quality manage-ment models, a variety of optimization algorithms has been used in the current lit-erature. These algorithms include linear programming (LP) [7-10], mixed-integer programming (MIP) [11-13], nonlinear programming (NLP) [14-15], and dynamic programming (DP) [16-17]. Although these algorithms may successfully solve the most problems, they may have some limitations. These methods may require good initial solutions to find an optimum solution. Also, the solution spaces of the prob-lem may have a non-convex and may include multiple local optimal solutions. So, all the obtained solutions of these methods may not be a global optimum [2]. Based upon these facts, using the heuristic approaches is preferred for solving these type problems. Among them the genetic algorithm (GA) [18-19], tabu search (TS) [20], particle swarm optimization (PSO) [21], and simulated annealing (SA) [22] may be the most popular ones.

Recently, a new optimization algorithm, Harmony Search (HS), is developed by Geem et al. [23]. HS is a heuristic search method which is based on the musical process of searching for a perfect state of harmony. In HS algorithm, musical process aims to find the musically pleasing harmony as determined by aesthetic or artistic standards, just as the optimization process seeks to find a global optimum solution as determined by an objective function value. This is the main analogy between the musical improvisation and optimization.

The main objective of this chapter is to review the application of HS algorithm to the solution of groundwater hydraulic management problems. In order to evalu-ate the performance of the HS algorithm, two example management problems are examined. The results of HS algorithm are compared with the results those ob-tained by several heuristic and non-heuristic optimization algorithms [24-27].

The remaining of this chapter is organized as follows: first, the computational structure of HS algorithm is presented; second, how to apply the HS algorithm to the solution of groundwater management problems is described; and finally, the performance of the HS algorithm is tested on two example management problems.

Page 118: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Solution of Groundwater Management Problems Using Harmony Search Algorithm 113

2 Heuristic Harmony Search (HS) Algorithm

Like other heuristic optimization algorithms, the HS is also inspired from a heuris-tic event. However, its main difference from the others is that HS does not get its main philosophy from a natural process, instead, gets from the musical improvisa-tion which occurs when a group of musicians searches for a better state of har-mony. This philosophy first adapted to the solution of optimization problems by Geem et al. [23]. In this adaptation, each musician mimics to a decision variable and the notes in the musicians’ memories correspond to the values of the decision variables. When the musicians find the fantastic harmony from their memories, it means, a global optimum solution is obtained using the corresponding decision variables. Note that the computational structure of the HS algorithm is based on the following three operations:

i) Playing a note from the harmony memory, ii) Playing a note randomly from the possible note range, iii) Playing a note which is close to another one stored in memory.

These operations are all musically based and integration of them allows finding

a musically pleasing harmony [3]. Adaptation of these musical operations into the engineering optimization problems is as follows:

i) New variable values are selected from the harmony memory, ii) New variable values are randomly selected from the possible range, iii) New variable values are further replaced with other values which are close

to the current values.

Combination of these three operations allows searching a global optimum solution in an optimization framework. For continuous decision variables, the computational scheme of HS can be given as follows [28]:

1. Initialize the harmony memory: Generate initial solution vectors as many as HMS, 1 HMS⋅ ⋅ ⋅x x .

2. Generate a new solution vector ′x for each ix′ : - with probability HMCR select ix′ from memory, (1, )Rnd HMS

i ix x′ = 3. Pitch adjustment: For each ix′ :

− with probability PAR change ix′ as, (0;1)i ix x bw Rnd′ ′= ± × . − with probability (1−PAR) do nothing.

− with probability (1−HMCR) select a new random value from the possible range.

4. If ′x is better than the worst jx in harmony memory, replace jx with ′x . 5. Repeat Steps 2 to 5 until the given termination criterion is satisfied. The solution parameters of HS are: Harmony Memory Size (HMS), Harmony

Memory Considering Rate (HMCR), Pitch Adjusting Rate (PAR), and distance bandwidth (bw). Note that the HM is a matrix where the decision variables and the

Page 119: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

114 M.T. Ayvaz

corresponding objective function values are stored. The HMCR and PAR parame-ters are used to improve the solution vector globally and locally. The computa-tional procedure of HS is described in Figure 1.

Fig. 1 Analogy between Musical Improvisation and Optimization [29]

As can be seen from Figure 1, each musician has several notes in their HM. The main question to be asked here is the “which notes will be played by the musicians to find a musically pleasing harmony?”. Depending on the three operations of im-provising a new harmony, the answer of this question is given as follows:

i) Memory Consideration: The first musician in Figure 1 has three notes, {La, Si, Do} in his HM. With probability HMCR(1−PAR), he decides to choose and play La from his HM. Since {La, Si, Do} corresponds to {1.0, 2.2, 2.6} in the optimization process, choosing and playing La corresponds to choosing and using 1.0 as the first decision variable.

ii) Pitch Adjusting: The second musician in Figure 1 has also three notes, {Do, Re, Mi} in his HM. Unlike the first musician, with probability HMCR×PAR, he chooses Do and plays its neighbour Do#. Since Do cor-responds to 3.2 in the optimization process, its neighbour Do# corresponds to 3.1 which is a small random amount neighbour to 3.2.

Page 120: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Solution of Groundwater Management Problems Using Harmony Search Algorithm 115

iii) Random Selection: The third musician in Figure 1 has also three notes, {Fa, Sol, La} in his HM. Although his HM is used in the previous im-provisations, due to his musical knowledge, he knows all the possible notes in the La scale. Thus, he decides to choose and play a note randomly, for example Mi in this case. As differently from the possible data set stored in HM, 1.6 is randomly chosen and used in this case, even if it does not exist in HM.

After musicians’ decision of what to play based on the memory consideration,

pitch adjustment and random selection, the new harmony is composed as {La, Do#, Mi} which corresponds to {1.0, 3.1, 1.6} in the optimization process. This iterative process is repeated until the given termination criterion is satisfied. Note that HS algorithm is applied to various engineering optimization problems such as music composition [30], sudoku puzzle [31], structural design [32], optimum cost design of water distribution networks [33], robotics [34], groundwater modeling [2,35], soil stability analysis [36], energy system dispatch [37], transport energy demand modeling [38], and medical physics [39] etc. The detailed information about HS algorithm can be found at algorithm’s web site [40].

3 Mathematical Formulation of Groundwater Management

In groundwater management, the main pupose is to select the best management strategy that aims to maximize the economic, hydraulic, and environmental benefits [4]. Note that the management alternatives usually have some constraints including well capacities, hydraulic heads, drawdowns, or water demand requirements, etc [2] and all of them must be included to the solution process of the optimization model. Before solving the problem through optimization model, first, it is necessary to solve the governing groundwater flow equation since its solution is required to predict the response of the aquifer system. The govening flow equation for a two-dimensional unconfined aquifer system can be given as [41]:

( )1 1

δT N

ti i y

t i

hh h R Q S

t= =

∂∇ ⋅ ⋅∇ + − =∂∑∑K x (1)

In Equation (1), K is the hydraulic conductivity, h is the hydraulic head, t is the

time, R is the areal recharge rate, tiQ is the pumping/injection rate at well i and

time t, ( )δ ix is a Dirac delta function evaluated at ix , yS is the specific yield, ∇

is the two-dimensional gradient operator, and N is the number of pumping wells. Note that the solution of Equation (1) is usually performed through finite difference (FD) or finite elements (FE) methods whose definitions are the beyond of this chapter.

It should be noted that the typical problems in groundwater hydraulic management are to maximize the groundwater pumping or to minimize the total pumping cost for given water demand [25]. For the first problem, the decision variables are the associated pumping rates. There are two constraint sets dealing

Page 121: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

116 M.T. Ayvaz

with the problem: i) pumping rates must be in a range of specified lower and upper bounds; ii) hydraulic head values at well locations must be greater than a specified lower bound. Depending on these constraints, the management model can be stated as follows:

1

maxN

i

i

z Q=

= ∑ (2)

subject to

,min ,max 1, 2,3, ,i i iQ Q Q i N≤ ≤ = ⋅⋅ ⋅ (3)

,min 1, 2,3, ,i ih h i N≥ = ⋅⋅ ⋅ (4)

where Qi,min and Qi,max are the minimum and maximum bounds of the pumping rates at well i; and hi,min is the minimum hydraulic head value at well i.

The main problem of the second management model is to minimize the pump-ing cost which includes the drilling, capital and operational costs, respectively. The decision variables of the optimization model are the associated pumping rates. The constraints set can be defined as follows: i) total pumping from the aquifer system must be greater than the given water demand; ii) hydraulic heads at well locations must be greater than a specified lower bound; iii) all the pumping rates must be in the range of a specified lower and upper bounds. This management model can be stated as follows:

( ) ( ) ( ) ( )2 31

1 2 31

minN b bb

i i i i i i ii

z a d a Q d h a Q d hκ=

⎧ ⎫⎡ ⎤= + − + −⎨ ⎬⎢ ⎥⎣ ⎦⎩ ⎭∑ (5)

subject to

1

N

ii

Q Q=

≥∑ (6)

,min 1, 2,3, ,i ih h i N≥ = ⋅⋅⋅ (7)

,min ,max 1, 2,3, ,i i iQ Q Q i N≤ ≤ = ⋅⋅⋅ (8)

1 if 0

1, 2,3, ,0 if 0

i

i

Qi N

⎧ ≠⎪= = ⋅⋅⋅⎨ =⎪⎩ (9)

where the terms in the right-hand side of Equation (3) are the well drilling, capital and well operation costs; ka and kb ( )1,2,3k∀ = are the cost coefficients and the

constants indicating economies of scale; Q is the given water demand; id is the

depth of the well at location i; and κ is the term which equals the cost of well drilling to zero when the pumping rate of that well is zero.

Page 122: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Solution of Groundwater Management Problems Using Harmony Search Algorithm 117

4 Numerical Applications

As summarized above, a wide variety of optimization problems has been solved using HS optimization algorithm. Among them, Ayvaz [2] first applied the HS to the solution of groundwater management problems. In the related study, three common management problems are solved: maximizing the total pumping from an aquifer system; minimizing the total pumping cost; and minimizing the total pumping cost for multiple management periods. Note that while the first and the second problems have steady-state flow conditions, the last one is solved for transient flow conditions. In the following sections, the identified results of HS for the first two management problems [2] will be compared with LP [24], NLP [24], GA [24-25], SA [25], GASAPF (GA based SA penalty function approach) [26], and SCE-UA (shuffled complex evaluation method developed at the University of Arizona) [27].

4.1 Example 1

The first example problem deals with the maximization of the total pumping from an aquifer system. The plan and cross-sectional views of the unconfined aquifer system under consideration can be seen in Figure 2.

As can be seen from Figure 2, the aquifer has a 20 m specified head boundary condition at the west (river) and east (swamp), and a no-flow boundary condition at the other sides. The porous medium is mainly composed from mixed sand-gravel and the hydraulic conductivity is 50 m/day. Also, there is a 0.001 m/day areal recharge flux into the aquifer. The number of pumping wells to be optimized is 10 for this example. All the pumping rates must be in the range of 0 to 7,000 m3/day and hydraulic head values at well locations must be greater than zero. The objective function for this problem is Equation 2. Note that Equation 2 and its constraint set are linear in squared head values [24]. Thus, global optimum of Equation 2 can be found using LP. Subject to the constraints identified above, maximization of Equation 2 yields the results given in Table 1.

From the literature, the global optimum solution for this example is 59,300 m3/day. Note that this example is solved by two different GA based solution mod-els as indicated in Table 1. Comparison of these solutions and LP indicates that the second GA solution (59,000 m3/day) [25] closely agrees with LP than the first GA solution (58,000 m3/day) [24]. The reason of this may be associated with the differences between the used discretization schemes. This difference also influ-ences the number of simulations. While the first GA model requires 640 simula-tions, the second one requires 27,800. For this example, the other solution meth-ods produce the following results: 59,400 m3/day from SA; 59,078 m3/day from GASAPF; 59,266 m3/day from SCE-UA; and 59,279 m3/day from HS. These re-sults state that the SA found a better objective function value than GASAPF, SCE-UA and HS. However, the identified pumping rates of SCE-UA and HS much closely agree with the LP solution than SA. The number of required simulations indicates that the HS requires fewer simulations (8,843) than SA (17,200).

Page 123: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

118 M.T. Ayvaz

Q1

Q2

Q3

Q4

Q5

Q6

Q7

Q8

Q9

Q10

4,50

0 m

10,000 m

Swam

p, h

= 2

0 m

Riv

er, h

= 2

0 m

No-flow

No-flow

(a)

River SwampSand & Gravel K = 50 m/d

Areal Recharge R = 0.001 m/d

Bedrock

Elevation (m)

1020

1000

980 (b)

Fig. 2 Aquifer System: (a) Plan View and (b) Cross-Sectional View [24]

Table 1. Comparison of Optimized Pumping Rates (Units: m3/day)

Wells LP

[24] GA [24]

GA [25]

SA [25]

GASAPF [26]

SCE–UA [27]

HS [2]

1 7,000 7,000 7,000 7,000 7,000 7,000 7,000 2 7,000 7,000 7,000 7,000 7,000 7,000 7,000 3 7,000 7,000 7,000 7,000 7,000 7,000 7,000 4 6,000 7,000 5,000 6,200 6,056 5,987 5,904 5 4,500 2,000 5,000 4,700 4,290 4,477 4,590 6 6,000 6,000 6,000 6,200 6,056 5,986 5,904 7 6,800 7,000 7,000 6,650 6,774 6,814 6,821 8 4,100 4,000 4,000 4,000 4,064 4,094 4,121 9 4,100 4,000 4,000 4,000 4,064 4,094 4,120

10 6,800 7,000 7,000 6,650 6,774 6,814 6,820 Total

Pumping 59,300 58,000 59,000 59,400 59,078 59,266 59,279

Number of Simulations

N/A 640 27,800 17,200 N/A N/A 8,843

Page 124: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Solution of Groundwater Management Problems Using Harmony Search Algorithm 119

4.2 Example 2

The second example deals with the minimization of the pumping cost including drilling, capital and operation costs to satisfy the 30,000 m3/day water demand from the aquifer system in Figure 2. Similar to previous example, all the pumping rates must be in the range of 0 to 7,000 m3/day and head values at well locations must be greater than zero. Note that this constraint set is handled through a penalty function approach whose definition is out of scope of this chapter. For this exam-ple, the objective function is Equation 5. Table 2 compares the identified results of HS [2] and NLP [24], GA [24-25], SA [25], and SCE-UA [27].

It can be seen from Table 2 that all the solution algorithms have different re-sults in terms of the identified pumping rates. This result states that this example has multiple global optimum solutions. While all the heuristic algorithms satisfy the given water demand, however, there is a small difference in the NLP solution. Among the final results, the minimum objective function value, $106,891, is ob-tained in HS solution. To obtain this result, HS requires 7,494 simulations. As can be seen, this example was also solved by two different GA models where the first one solves the problem in 896 simulations whereas the second one solves it about 8,000. The reason of this is associated with the differences between the used solu-tion schemes described before. For this problem, SA requires approximately 10,000 simulations.

Table 2. Comparison of Identified Results for Different Algorithms (Units: m3/day and $)

Wells NLP [24]

GA [24]

GA [25]

SA [25]

SCE–UA [27]

HS [2]

1 5,600 6,000 6,000 6,000 5,886 6,147 2 4,550 5,000 4,000 4,000 4,833 4,620 3 5,860 7,000 6,000 6,000 5,894 6,146 4 0 0 0 0 0 0 5 0 0 0 0 0 0 6 0 0 0 0 0 0 7 7,000 6,000 7,000 7,000 6,694 6,543 8 0 0 0 0 0 0 9 0 0 0 0 0 0

10 7,000 6,000 7,000 7,000 6,693 6,544 Demand 30,010 30,000 30,000 30,000 30,000 30,000

Total Pump-ing Cost ($)

106,990 107,134 106,992 106,992 106,896 106,891

Number of Simulations

N/A 896 ~ 8,000 ~ 10,000 N/A 7,494

5 Conclusions

This chapter reviewed the application of the HS algorithm to the solution of groundwater management problems. In order to evaluate the application ability of

Page 125: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

120 M.T. Ayvaz

the HS algorithm in finding the global optimum solution for groundwater man-agement problems, the performance of HS is compared with various non-heuristic and heuristic optimization algorithms given in literature. The following results and outcomes can be drawn from this review:

For the first example, HS finds approximately same results with the LP solution which is the global optimum solution of that problem. The comparison of HS and the other heuristic algorithms states that HS finds slightly better objective function values than GA, GASAPF, and SCE-UA. When compared the performance of HS with other solution algorithms in terms of the number of required simulations, it can be seen that HS requires less iteration than SA and the second GA model. However, it requires more simulations than the first GA solution since the first GA solution solves the problem by using a coarse pumping discretization scheme.

For the second example, the identified results indicate that HS gives slightly better objective function values than NLP, GA, SA, SCE-UA. Also, the final iden-tified pumping rates are in good agreement with the given water demand. In terms of the number simulations, HS solves the problem in less simulation than SA and the second GA models. Results of this review indicate that HS can be effectively used for solving the groundwater management problems.

References

1. Das, A., Datta, B.: Application of optimization techniques in groundwater quantity and quality management. Sadhana 26(4), 293–316 (2001)

2. Ayvaz, M.T.: Application of harmony search algorithm to the solution of groundwater management models. Advances in Water Resources 32(6), 916–924 (2009)

3. Ayvaz, M.T.: Groundwater parameter structure identification using harmony search algorithm. In: Geem, Z.W. (ed.) Music-Inspired Harmony Search Algorithm: Theory and Applications. Studies in Computational Intelligence Series. Springer, Heidelberg (2009)

4. Willis, R.L., Yeh, W.W.G.: Groundwater systems planning and management. Prentice-Hall, Englewood Cliffs (1987)

5. Aral, M.M., Guan, J., Maslia, M.L.: Identification of contaminant source location and release history in aquifers. Journal of Hydrologic Engineering 6(3), 225–234 (2001)

6. Guan, J., Aral, M.M.: Optimal remediation with well locations and pumping rates se-lected as continuous decision variables. Journal of Hydrology 221, 20–42 (1999)

7. Deninger, R.A.: Systems analysis of water supply systems. Water Resources Bulle-tin 6, 573–579 (1970)

8. Aguado, E., Remson, I.: Groundwater hydraulics in aquifer management. Journal of Hydraulic Div–ASCE 100(HY1), 103–118 (1974)

9. Aguado, E., Remson, I., Pikul, M.F., Thomas, W.A.: Optimal pumping for aquifer de-watering. Journal of Hydraulic Div–ASCE 100(HY7), 860–877 (1974)

10. Willis, R.: A unified approach to regional groundwater management. In: Rosenshein, J.S., Bennett, G.D. (eds.) Groundwater hydraulics. Water Resources Monograph Se-ries, Washington, DC (1983)

11. Willis, R.: Optimal groundwater quality management: Well injection of waste water. Water Resources Research 12, 47–53 (1976)

Page 126: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Solution of Groundwater Management Problems Using Harmony Search Algorithm 121

12. Aguado, E., Remson, I.: Groundwater management with fixed charges. Journal of Wa-ter Resources Planning and Management–ASCE 106(WR2), 375–382 (1980)

13. Misirli, F., Yazicigil, H.: Optimal ground–water pollution containment with fixed charges. Journal of Water Resources Planning and Management–ASCE 123, 2–12 (1997)

14. Gorelick, S.M., Voss, C.I., Gill, P.E., Murray, W., Saunders, M.A., Wright, M.H.: Aq-uifer reclamation design: The use of contaminant transport simulation combined with nonlinear programming. Water Resources Research 20, 415–427 (1984)

15. Finney, B.A., Samsuhadi, W.R.: Quasi three–dimensional optimization model of Ja-karta Basin. Journal of Water Resources Planning and Management–ASCE 118(1), 18–31 (1992)

16. Murray, D., Yakowitz, S.: Constrained differential dynamic programming and its ap-plication to multireservoir control. Water Resources Research 15(4), 1017–1027 (1979)

17. Jones, L., Willis, R., Yeh, W.W.-.G.: Optimal control of nonlinear groundwater hy-draulics using differential dynamic programming. Water Resources Research 23(11), 2097–2106 (1987)

18. Holland, J.H.: Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. University of Michigan Press, Ann Arbor (1975)

19. Goldberg, D.E.: Genetic algorithms in search, optimization, and machine learning. Addison-Wesley Pub. Co., Reading (1989)

20. Glover, F.: Heuristic for integer programming using surrogate constraints. Decision Sciences 8(1), 156–166 (1977)

21. Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proc. of the IEEE Int. Conf. on Neural Networks, Piscataway, NJ, pp. 1942–1948 (1995)

22. Kirkpatrick, S., Gelatt, C., Vecchi, M.: Optimization by simulated annealing. Sci-ence 220(4598), 671–680 (1983)

23. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: Harmony search. Simulation 76(2), 60–68 (2001)

24. McKinney, D.C., Lin, M.-D.: Genetic algorithm solution of groundwater management models. Water Resources Research 30(6), 1897–1906 (1994)

25. Wang, M., Zheng, C.: Ground water management optimization using genetic algo-rithms and simulated annealing: Formulation and comparison. Journal of the American Water Resources Association 34(3), 519–530 (1998)

26. Wu, J., Zhu, X., Liu, J.: Using genetic algorithm based simulated annealing penalty function to solve groundwater management model. Science in China Series E: Techno-logical Sciences 42(5), 521–529 (1999)

27. Wu, J., Zhu, X.: Using the shuffled complex evolution global optimization method to solve groundwater management models. In: Zhou, X., Li, J., Shen, H.T., Kitsuregawa, M., Zhang, Y. (eds.) APWeb 2006. LNCS, vol. 3841, pp. 986–995. Springer, Heidel-berg (2006)

28. Wikipedia: Harmony Search (2007), http://en.wikipedia.org/wiki/Harmony_search (accessed 29 October 2008)

29. Jon Anderson’s Web Site (2008), http://dreams-in-color.com/sketch.html (accessed 29 October 2008)

Page 127: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

122 M.T. Ayvaz

30. Geem, Z.W., Choi, J.Y.: Music Composition Using Harmony Search Algorithm. In: Giacobini, M., et al. (eds.) EvoWorkshops 2007. LNCS, vol. 4448, pp. 593–600. Springer, Heidelberg (2007)

31. Geem, Z.W.: Harmony Search Algorithm for Solving Sudoku. In: Carbonell, J.G., Siekmann, J. (eds.) Knowledge-Based Intelligent Information and Engineering Sys-tems. Springer, Heidelberg (2008)

32. Saka, M.P.: Optimum design of steel sway frames to BS5950 using harmony search algorithm. Journal of Constructional Steel Research 65(1), 36–43 (2008)

33. Geem, Z.W.: Optimal cost design of water distribution networks using harmony search. Engineering Optimization 38(3), 259–277 (2006)

34. Tangpattanakul, P., Artrit, P.: Minimum-time trajectory of robot manipulator using Harmony Search algorithm. In: 6th International Conference on Electrical Engineer-ing/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), May 6-9, pp. 354–357 (2009)

35. Ayvaz, M.T.: Simultaneous determination of aquifer parameters and zone structures with fuzzy c-means clustering and meta-heuristic harmony search algorithm. Advances in Water Resources 30, 2326–2338 (2007)

36. Cheng, Y.M., Li, L., Lansivaara, T., Chi, S.C., Sun, Y.J.: An improved harmony search minimization algorithm using different slip surface generation methods for slope stability analysis. Engineering Optimization 40(2), 95–115 (2008)

37. Vasebi, A., Fesanghary, M., Bathaee, S.M.T.: Combined heat and power economic dispatch by harmony search algorithm. International Journal of Electrical Power & En-ergy Systems 29(10), 713–719 (2007)

38. Ceylan, H., Ceylan, H., Haldenbilen, S., Baskan, O.: Transport energy modeling with meta-heuristic harmony search algorithm, an application to Turkey. Energy Pol-icy 36(7), 2527–2535 (2008)

39. Panchal, A.: Harmony Search in Therapeutic Medical Physics. In: Geem, Z.W. (ed.) Music-Inspired Harmony Search Algorithm: Theory and Applications. Studies in Computational Intelligence Series. Springer, Heidelberg (2009)

40. Harmony Search Algorithm Web Site (2009), http://www.harmonysearch.info/ (accessed 12 October 2009)

41. Bear, J.: Dynamics of fluids in porous media. Elsevier, New York (1972)

Page 128: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 123–134. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

Application of the Harmony Search Optimization in Irrigation

Milan Cisty*

Abstract. In its first part this chapter briefly reviews applications of the Harmony Search (HS) optimization method in the irrigation industry. As will be seen, HS can be applied in similar problem areas as other heuristics. Therefore, other heuristic method applications in the irrigation industry are mentioned in this part of the chap-ter to encourage the use of HS instead, because of its already-reported effectiveness while handling various problems. The remainder of the chapter deals with one pos-sible application of HS – the calibration of a simulation model of the hydraulic part of an irrigation system. This calibrated simulation model can be used in the design, reconstruction, enlargement or maintenance of pressurized irrigation systems. The calibration of the water distribution model consists of a comparison of predicted pressures and flows with those observed under known operating conditions (i.e., pump operation, tank levels, pressure-reducing valve settings), and an adjustment of the input data for the model to improve the agreement between the observed and predicted values. In practice, given a set or sets of measured state variables, engi-neers apply trial and error techniques, using their judgment to vary the parameters and accomplish this task. Trial and error techniques are tedious and do not always guarantee reasonable results. This chapter introduces a methodology for determin-ing calibrated parameters automatically through the exploitation of the HS optimi-zation method.

1 Introduction

This chapter demonstrates a potential application of the Harmony Search (HS) al-gorithm in the irrigation industry. It will mainly focus on the applications intended for the design or management of the sprinkler irrigation method, although applica-tions of HS when using some other types of irrigation methods (drip, furrow, bor-derstrip or basin irrigation) are also possible.

Sprinkler irrigation is a method of applying irrigation water which is similar to a natural rainfall. Water is usually distributed through a system of pipes by pump-ing. It is then sprayed into the air through sprinklers so that it breaks up into small Milan Cisty Department of Land and Water Resources Management, Faculty of Civil Engineering, Slovak University of Technology, Bratislava, Slovak Republic E-mail: [email protected]

Page 129: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

124 M. Cisty

water drops, which fall to the ground. The pump supply system, sprinklers and op-erating conditions must be designed to enable the uniform application of water.

A typical sprinkler irrigation system consists of the following components (not all of these must always be included):

• Source of the water (reservoir, river, well, waste water) • Conduit to irrigation area (for instance, a canal or pipe system) • Pump unit • Pipe network (mainline and submainlines) • Sprinklers or various types of irrigators (center pivot sprinkler system, linear

move system, traveling big gun system, portable hand-move lateral pipe sys-tem, solid-set irrigation system, etc.)

Agriculture and irrigation have affected the rise and fall of many great civiliza-tions. Although agriculture is so necessary for human life, work in this sector is not a very effective way to achieve economic benefits in many countries of to-day’s world. This is paradoxical when we bear in mind that the world’s popula-tion has grown from 2.5 billion in 1950 to 6.5 billion today. In some countries the importation of agricultural products from other parts of the world constitutes sig-nificant competition for domestic agricultural production, so it is absolutely essen-tial to ensure a nation’s agriculture and irrigation are as economically efficient as possible; otherwise these sectors will not survive in a market economy. Moreover, other pressures bear on irrigation and agriculture; one of the most important is that this sector has the potential to be a significant cause of environment degradation. Various constraints must be accepted by an irrigation manager from this signifi-cant point of view; some of them contrast with the immediate benefits from agri-cultural production. As a result of the above-mentioned and various other reasons, seeking optimal design strategies and management techniques in the irrigation sec-tor is always an important task.

Among the various technological, biological, chemical and/or organizational practices applied to keep irrigation and agriculture efficient and sustainable, the support of mathematical and informatics techniques also has its place. Various op-timization techniques have been used in the design and management of irrigation projects. Additionally, modern heuristic methods with their ability to deal with complicated real life problems are often used for various aspects of the design and management of irrigation projects. The potential for the application of HS and other optimization methods in the irrigation industry will be briefly indicated in this chapter (because this is a very broad subject, what follows is not a complex review; some examples are mentioned, and one application is described in more detail). Because HS can be applied to similar problems as can other heuristic me-thods, the first part mentions applications in the irrigation industry without distin-guishing what type of heuristic or optimization method was used.

2 Application of Optimization Methods in Irrigation

Almost all parts of an irrigation system can be subjected to optimization from various points of view – either in design stage or while managing them. Possible

Page 130: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Application of the Harmony Search Optimization in Irrigation 125

applications will follow in a similar order as in the list of the main parts of the ir-rigation system mentioned hereinbefore.

The optimal utilization of an irrigation water supply (e.g., a reservoir) requires knowledge of the reservoir regulation process as well as knowledge of the in-field process at the point of actual water use. Integrating this knowledge in order to fa-cilitate informed decisions on the operation of a reservoir generally requires the use of a mathematical model. The reservoir inflow, the amount of rainfall on an ir-rigated area, crop water requirements assessed from potential evapotranspiration, and the cropping pattern are the critical inputs for such a model. The objective is usually to maximize the sum of the relative yields from all the crops in the irri-gated area. Heuristic methods, e.g., genetic algorithms (GA), were applied to this task [1] with the aim of obtaining a model to provide an optimal operating policy and optimal crop water allocations from an irrigation reservoir. The HS model’s application to a benchmark system with four dams has been referenced as well [2]. The results showed that the HS model found five different global optimal solu-tions with identical maximum benefits from hydropower generation and irrigation, while the enhanced GA model (real-value coding, tournament selection, uniform crossover, and modified uniform mutation) only found near-optimal solutions un-der the same number of function evaluations.

Canals are among the most significant elements of an irrigation system. The economy of many countries depends on the extent of their canal networks. Thus, an optimization method, which was used for an optimal water distribution sched-ule in irrigation canals, has been developed. Through consideration of several ob-jectives of irrigation systems, a multi-objective simulated annealing optimization technique was utilized for the problem. Based on the water requirements at the de-livery points, the model developed determines the time and rate of water delivery. The canal’s capacity and operational stages are minimized, and the water require-ments are satisfied as closely as possible.

The construction of canals is an expensive undertaking; therefore, the economic design of canal sections is an important concern of civil engineers. A cost-effective channel section for a specified flow rate, roughness coefficients, the longitudinal slope, and various cost parameters can be determined using various optimization techniques. It is also necessary to incorporate criteria for side slope stability while designing an optimal open channel section [3]. HS methodology has been applied to the problem of slope stability with success as well [4].

The HS optimization model for a pump as part of a water network is referred in the literature [5] to obtain better results in terms of average design cost, number of function evaluations, and hydraulic simulation conditions as compared to those of other evolutionary algorithms. The energy required for operating pumping stations in an irrigation district may be significant. The cost of establishing a new pumping station and the ever-increasing cost of energy have caused researchers to pay more attention to the optimal design and operation of pumping stations. Energy costs constitute the largest expenditure for nearly all water utilities worldwide and can consume up to 65% of a water utility's annual operating budget [6]. One of the greatest potential areas for energy cost savings in irrigation systems is in the sche-duling of pump operations. The optimal design and operation of an irrigation

Page 131: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

126 M. Cisty

pumping station is proposed in [7] using the heuristic approach. The computation is driven by an objective function that includes the operating and capital costs sub-ject to various performance and hydraulic constraints.

Various computer models have been developed for optimizing an irrigation pipe network, e.g., a model called GENOME (Genetic Algorithm Pipe Network Optimization Model), with the aim of optimizing the design of new looped irriga-tion water distribution networks [8]. The model is based on a GA method. The HS methodology was also used for solving this problem, with its effectiveness outper-forming various other heuristic methods [9]. The HS model was applied to five water distribution networks and obtained designs that were either the same or cost 0.28-10.26% less than those of competitive meta-heuristic algorithms such as the genetic algorithm, simulated annealing and tabu search under similar or less fa-vorable conditions.

For pressurized systems, there are three different ways of scheduling irrigators: on-demand, restricted on-demand, and rotation. Wardlaw and Bhaktikul [10] de-scribed a heuristic model to solve an irrigation water scheduling problem. The ob-jective was to optimize the utilization of water resources in irrigation systems operating on a rotational basis. An objective function for water scheduling prob-lem is presented along with constraints that relate to in-field soil moisture balances as well as canal capacities. In Farmani and Savic’s study [11], the optimum design and management of pressurized irrigation systems are considered to be based on rotation and on-demand delivery scheduling using a genetic algorithm. Irrigation systems based on on-demand delivery scheduling offer flexibility to farmers and greater potential profits than other types of irrigation schedules. A comparison be-tween on-demand and rotation delivery scheduling shows that a greater than 50% savings can be achieved in the total cost at the cost of reducing flexibility in the ir-rigation time.

3 Simulation Model and Its Calibration

From this subheading till the end of the chapter, the calibration of the simulation models will be described in more detail as an example of the application of the HS method in the irrigation industry.

Simulation models are used in the design of new irrigation systems, the recon-struction or modernization of an existing system or the maintenance of different tasks while managing currently existing irrigation systems. They answer what happens if pumps are replaced with new ones, when the type, number or place-ment of the irrigators is changed or if the pipes are replaced with pipes of different diameters, etc., in terms of the water distribution system’s resulting behavior (for example, if pressures on the hydrants will be satisfactory). Several simulation models have been developed for analyzing hydraulic networks of irrigation and drinking water systems. Among those models, the three most commonly used for irrigation networks are: EPANET [12], COPAM [13], and GESTAR [14]. EPANET was used for this paper because it is a reliable model that has been ap-plied worldwide for various types of water distribution networks.

Page 132: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Application of the Harmony Search Optimization in Irrigation 127

An EPANET simulation model that analyzes hydraulics in water distribution systems was used in this work. Like the other network models mentioned, EPANET abstracts an actual distribution system into a network of links connected together at their endpoints called nodes. The links can represent pipes, pumps, or control valves. The nodes can be junctions, reservoirs, or tanks. The junctions can also contain emitters (or sprinklers), which make the outflow rate dependent on the pressure. This feature is especially useful for modeling irrigators, and its usage is a better choice than inputting demands as absolute values. Based on the infor-mation contained in the input file, EPANET can compute flows, pressures and other parameters throughout a network.

EPANET exists in two basic forms - as a desktop application with a graphical user interface and as an EPANET Toolkit. The EPANET Programmer's Toolkit is a dynamic link library (DLL) of functions that allows software developers to cus-tomize or call EPANET’s computational engine according to their own needs. The toolkit is useful for developing specialized applications that require running many network analyses, which is the case when calibrating a simulation model. The EPANET Toolkit and hereinafter-described harmony search algorithm principles were used for developing software for calibration purposes of the hydraulic model of an irrigation network.

When a simulation model is to be applied, one should be certain that the results from the model bear a close resemblance to the actual performance of the hydrau-lic system. However, various factors always result in differences between the real-ity and the results, including errors and presuppositions of the simulation model’s design period, human and tool errors, false simplifying in the model’s design, er-rors in determining the boundary conditions, etc. So, in order to be sure of the cor-rect model function for different operating conditions, the model’s calibration is necessary.

Ormsbee and Lingireddy [15] state that, in general, calibrating a network model should encompass seven basic steps:

1. Identifying the intended use of the model. 2. Determining the initial estimates of the model’s parameters. 3. Collecting the calibration data. 4. Evaluating the model’s results. 5. Performing a macro-level calibration. 6. Performing a sensitivity analysis. 7. Performing a micro-level calibration.

Deviations in the results of the model’s application from field observations (usually pressures and flows are measured in a system) may be caused by several factors, including:

• Erroneous model parameters (pipe roughness values and nodal demand distri-bution).

• Erroneous network data (pipe diameters, lengths, etc.). • Incorrect network geometry (pipes connected to the wrong nodes). • Incorrect boundary definitions of pressure zones.

Page 133: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

128 M. Cisty

• Errors in boundary conditions (incorrect pressure-regulating valve settings, tank water levels, pump curves, etc.).

• Errors in historical operating records (i.e., pumps starting and stopping at the wrong times).

• Measurement equipment errors (i.e., pressure gauges not properly calibrated). • Measurement error (i.e., reading the wrong values from measurement instru-

ments).

If the state variable measured values are significantly different from the mod-eled values, the reason for the difference is probably in the input data. The only way to adequately address such macro-level errors is to systematically review the data associated with the model and compare them with the real - field data. This is macro-level calibration.

4 Micro-level Calibration by HS Optimization

Although there are many parameters that are uncertain and affect the values of the pressures in the junctions or flow rate of the pipes, the calibration process at its micro-level mainly involves the determination of the pipeline’s roughness coeffi-cients after several years of the system’s operation. Traditional calibration of a water distribution model is based on a trial-and-error procedure, by which the modeler first estimates the values of the model’s parameters, then runs the model to obtain the pressures and flows predicted, and finally compares the simulated values with the observed data. If the predicted data do not compare closely with the observed data, the engineer returns to the model, makes some adjustments to the model’s parameters, and runs it again to produce a new set of simulation re-sults. This may have to be repeated many times to make sure that the model pro-duces a close-enough prediction of the water distribution network in the real world. The traditional calibration technique is, among other things, quite time con-suming. In addition, a typical network representation of a water network may in-clude hundreds or thousands of links and nodes which the modeler should deal with. This chapter introduces a methodology for determining calibration parame-ters automatically.

The harmony search [16] algorithm was adopted from the musical process of finding “pleasant harmonies” through improvisation. For instance, when several notes from different musical instruments are played simultaneously on a random basis and this process is repeated, there is the possibility of finding better harmo-nies. In the HS methodology, these better harmonies are saved in a certain size of memory by replacing the worst harmony in the memory until the predefined max-imum number of improvisations generating a new harmony is reached.

The five fundamental steps of HS could be summarized as follows: Step 1: De-sign variable and initialization of algorithm parameters; Step 2: Harmony memory initialization; Step 3: Generation of a new harmony; Step 4: Harmony memory update if needed; and Step 5: Improvisation stopping criterion check.

Page 134: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Application of the Harmony Search Optimization in Irrigation 129

Step 1: Design variable and initialization of algorithm parameters The optimization is expressed as follows:

)(min xx

f (1)

Subject to xi ∈ Xi,j ; i =1,2,...,N ; j =1,2,...,K (2)

where f (x) is an objective function; x is the vector of the variables calibrated (mainly the roughness coefficients of the pipes), Xi is the set of the possible values of each variable, which is bounded by a predefined range; N is the total number of searching variables; K is the number of possible values for the variables (for in-stance, we can design 10 possible roughness coefficients for a particular pipe or emitter coefficients for a particular irrigator working in a field during the meas-urements). The model of the irrigation network with the lengths and connections of the pipes and other necessary data is read by the HS optimization calibration model in the form of an EPANET INP file [12].

The four HS algorithm parameters that need to be initialized are the harmony memory size (HMS), the harmony memory consideration rate (HMCR), the pitch adjustment rate (PAR), and the maximum number of improvisations (NI).

Step 2: Harmony memory initialization The harmony memory is a memory location (matrix), where the solution vectors (sets of roughness coefficients or other calibrated parameters) and corresponding objective function values are stored. The initial HS memory consists of HMS dif-ferent randomly generated solution vectors. Each such solution vector contains randomly generated pipe roughness values or other calibrated parameters of the EPANET model (taken from a predefined range of the possible values). All the harmonies found are stored in the harmony memory, which has the form of (HMS) × (N+1) matrix. Columns one through N store the searched variable’s values, and the last column contains the objective function values.

In the case of the calibration of the simulation model, various objective func-tions can be used. The following equation was chosen for this work:

Q

N

n n

n

P

N

n n

n

N

Qobs

Qcalc

kN

Pobs

Pcalc

min

2

1

2

1

)1()1( ∑∑==

−×+

− (3)

Where Pobsn is the measured pressure n within the system [Mpa], Pcalcn is the pressure calculated with EPANET [Mpa], Qobsn is the measured flow after the pump station [l/s], Qcalcn is the flow calculated by EPANET after the pump sta-tion [l/s], k is the weight coefficient that stresses the importance of the requirement to comply with the measured flows after the pump station or other strategic points, Np is the number of junctions with observed pressure and Nq is the number of links with an observed flow.

Page 135: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

130 M. Cisty

Step 3: Generation of a new harmony The evolution of new solutions is accomplished in this step. The improvisation or generation of a new harmony (generation of a new, hopefully better, combination of roughness coefficients or other calibrated parameters) is performed based on three rules: 1) memory consideration, 2) pitch adjustment, and 3) random selec-tion. These general HS algorithm principles can be found in [16] or in other chap-ters of this book.

Step 4: Harmony memory update In this step the EPANET model is run with data taken from the new harmony. By comparing the results of the computation with the values observed (Eq. 3), one gets the value of the objective function. If the new objective function value is lesser than the worst objective function value in the harmony memory, the worst harmony vector is replaced by the new harmony vector. A lesser objective func-tion value means that in the case of the new harmony, smaller differences are be-tween the modeled and observed pressures or flows by using the parameters coded in a new harmony.

Step 5: Stopping Criterion A conditional statement is applied to judge whether this harmony search loop needs to be repeated or stopped. In the case of a calibration problem the harmony search stops if there is no improvement in comparing the observed and modeled values by an objective function (Eq. 3) on the last five hundred iterations.

5 Results and Discussion

The procedure described for calibrating an irrigation system was applied to the Kuty irrigation system (southwest Slovakia). Its layout is shown in Figure 1. This is one of the relatively old irrigation facilities with a large area in Slovakia. The ir-rigation system consists of the irrigation pump station, a pressurized network for delivering the irrigation water and sprinklers. The layout of the irrigation network is branched and consists of approximately 25 km of pipes (steel, cast iron and some new PVC pipes). Its construction was completed in the mid-1960s; thus, the whole facility is coming close to the end of its service life. For this reason it can serve as a suitable model for testing the proposed methods of calibrating the simu-lation model. The parameters such as the roughness coefficients, pump operation characteristics, etc., were changed, and their values should therefore be searched for. The simulation model could be used for a rehabilitation design or for finding the best operational rules under various conditions (new crops, new irrigators in-troduced into the system, etc.). The process of micro-calibration in this case in-cluded finding the emitter coefficients of the irrigators (see EPANET manual), fine-tuning the roughness of the pipes and altering the pump’s operating character-istics. Considering the scale of the input and output data, the results of the calcula-tion are only generally described; detailed information can be provided by the au-thor of this chapter.

Page 136: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Application of the Harmony Search Optimization in Irrigation 131

Fig. 1 Layout of an irrigation system for which the simulation model calibration was verified

The experience of irrigation users as well as the measurements taken at the Ku-ty irrigation system demonstrated that during the operation of the irrigation sys-tem, insufficient pressure in the hydrants has occurred quite often. This has par-tially been caused by an improper network layout. Additionally, another problem often occurs during the operation of the irrigation system. The incorrect working scheme of the irrigators (e.g., the high concentration of sprinklers in some parts of the irrigation system), also results in insufficient pressures. Since such events have taken place within the described system, the operator should be instructed and given recommendations to reorganize the usage of the irrigation system. The simulation model is a suitable tool for solving these types of tasks.

A good solution for low pressures is, for instance, the creation of a loop in some parts of the pipeline network, e.g., making a loop of the A3 and A4 branches or in other parts of the system. Such a solution is optimal from an economic view-point as well as in terms of achieving the technical parameters required (pres-sures). It also simplifies work during the operation and also seems to be favorable in the event of failure (in cases of malfunctions in the pipe system, it provides an alternative way to transport water to the hydrants). Such reconstruction cannot be appropriately accomplished without the creation, calibration and application of a simulation model.

Kúty

Ar eál ŠM

JEST

VUJÚ

CA

VETV

A

JEST

VUJÚ

CA

VETV

A

PLYN

OVO

D

PLYN

OVO

D

PLYN

OVOD

Navrho vaný vodovod

vz. v

eden

ie

vz.

veden

ie

Z DR OJ

V OD .

Ďialn

ica

ÈS "A"

"A"

"A"

"B"

"B"

"B"

"A1" "A2""A3"

"A4"

"A7"

"A6"

"B1"

"B3" "B4"

"B5"

"B6""B7""B8""B9"

KÚTY

• Pressure measurement

• •

5 1

2

3

4

7

6

98

10

11

12

Pump

KUTY

Page 137: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

132 M. Cisty

The hydraulic condition was analyzed using measurements performed both at the pump station and in the irrigation pipeline network. In order to analyze the hy-draulic behavior of the system for this purpose, more detailed measurements as well as a calibrated simulation model were needed. In the first step, a preliminary hydraulic model was developed. In the preliminary model some simplifications were made, for instance, the irrigators were modeled with a constant demand, not in a pressure-dependent regime. The measurements and this tool enable the identi-fication of various defects, operating malfunctions, etc., the repair of which is in-expensive (e.g., a partially closed network valve was detected in the A3 branch, which was marked by a significantly large difference between the measured and computed pressures on it). The elimination of such problems was the first step and, at the same time, the first profit generated by the calibration effort. If some repairs are not possible, they should also be modeled as any other hydraulic phe-nomenon in the system. This was completed in the so-called macro-calibration part of the process, which has previously been described.

The calibration work in the Kuty irrigation system included the measurement of pressures in the outlet from a pump station, the flow right behind the pump station and the measurement of pressures at typical points of the irrigation system (Fig-ure 1). The placement of the irrigators, their types and other parameters (sprinkler nozzle’s diameter) were also checked. Based on the specifications declared by the manufacturer, it was important to define the sprinkler’s characteristic curve. Be-cause this entry depended on the technical condition of the equipment, the pa-rameters of the sprinkler pressure-flow characteristic curve were also calculated in the context of the calibration computations (as emitter coefficients in EPANET).

The calculations result in the system calibrated for the testing operation condi-tions (another set of observed pressures and flows than that used in the calibra-tion process) revealed disparities in the pressures up to 4.8% and in the flows up to 4.9% (Figure 2). The results obtained represent a good degree of conformity. A larger disparity between the observed and simulated flows was caused, e.g., by oscillation of this entry due to the instability of the flow. As mentioned above,

Fig. 2 Calculation results in the system calibrated for the testing operation conditions

Page 138: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Application of the Harmony Search Optimization in Irrigation 133

the accuracy of the calibration depends not only on the setup of the roughness coefficients but also on other parameters, which can generate various errors. More accurate results can be achieved using additional specifications. For in-stance, the section lengths were determined from maps on a scale of 1:2000 (no numeric data were available). A more accurate section length could be deter-mined either from longitudinal profiles or by taking direct measurements in the field. The outcome confirms the suitability of the method even in cases with in-sufficient data available, which is often the case in practice.

6 Summary and Conclusions

This chapter provides examples of various applications of the optimization meth-ods used in the irrigation industry. It is focused mainly on applications for the sprinkler irrigation method. In the first part some HS applications together with other heuristic methods are mentioned for the design or maintenance of an irriga-tion water supply, canals, pump stations, pipe networks and irrigators. The HS methodology could be used almost anywhere where another heuristic method ap-plication has been referenced and in many cases with a better degree of effective-ness. The main part of the chapter deals with the use of simulation models in the design and maintenance of pressurized irrigation systems. In order to use simula-tion models, e.g., as a tool for the design of the reconstruction of these systems, one has to perform their calibration. Traditionally, the calibration of hydraulic network models has been a manual task with the modeler making changes to the parameter values on a trial-and-error basis to achieve an effect which he considers will result in an overall convergence between the field and model data. In this chapter the methodology for the determination of calibration parameters automati-cally is described. The methodology proposed is based on optimizing procedures using the harmony search optimization.

Acknowledgments

This work was supported by the Scientific Grant Agency of the Ministry of Edu-cation of the Slovak Republic and the Slovak Academy of Sciences, Grant No. 1/0585/08 and by the Slovak Research and Development Agency, Grants Nos. APVV-0271-07 and LPP-0319-09.

References

1. Kumar, D.N., Raju, K.S., Ashok, B.: Optimal reservoir operation for irrigation of mul-tiple crops using genetic algorithms. Journal of Irrigation and Drainage Engineer-ing 132, 123–129 (2006)

2. Geem, Z.W.: Optimal scheduling of multiple dam system using harmony search algo-rithm. In: Sandoval, F., Prieto, A.G., Cabestany, J., Graña, M. (eds.) IWANN 2007. LNCS, vol. 4507, pp. 316–323. Springer, Heidelberg (2007)

Page 139: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

134 M. Cisty

3. Bhattacharjya, R.B., Satish, M.G.: Optimal design of a stable trapezoidal channel sec-tion using hybrid optimization techniques. Journal of Irrigation and Drainage Engi-neering 133, 323–329 (2007)

4. Cheng, Y.M., Li, L., Lansivaara, T., et al.: An improved harmony search minimization algorithm using different slip surface generation methods for slope stability analysis. Engineering Optimization 40, 95–115 (2008)

5. Geem, Z.W.: Harmony search optimisation to the pump-included water distribution network design. Civil Engineering and Environmental Systems 26, 211–221 (2009)

6. Moradi-Jalal, M., Rodin, S.I., Marino, M.A.: Use of genetic algorithm in optimization of irrigation pumping stations. Journal of Irrigation and Drainage Engineering 130, 357–365 (2004)

7. Moradi-Jalal, M., Karney, B.W.: Optimal design and operation of irrigation pumping stations using mathematical programming and genetic algorithm. Journal of Hydraulic Research 46, 237–246 (2008)

8. Reca, J., Martinez, J.: Genetic algorithms for the design of looped irrigation water dis-tribution networks. Water Resources Research (2006), doi:10.1029/2005WR004383

9. Geem, Z.W.: Optimal cost design of water distribution networks using harmony search. Engineering Optimization 38, 259–280 (2006)

10. Wardlaw, R., Bhaktikul, K.: Application of genetic algorithms for irrigation water scheduling. Irrigation and Drainage 53, 397–414 (2004)

11. Farmani, R., Abadia, R., Savic, D.: Optimum design and management of pressurized branched irrigation networks. Journal of Irrigation and Drainage Engineering 133, 528–537 (2007)

12. Rossman, L.A.: EPANET2 users manual. US Environmental Protection Agency, Cin-cinnati (2000)

13. Lamaddalena, N., Sagardoy, J.A.: Performance analysis of on-demand pressurized irri-gation systems. FAO Irrigation and Drainage Paper No. 59, Rome (2000)

14. Aliod, R., Eizaguerri, A., Estrada, C., Perna, E.: Dimensionado y análisis hidráulico de redes de distribución a presión en riego a la demanda: Aplicación del programa GESTAR. Riegos y Drenajes XXI 92, 22–38 (1997)

15. Ormsbee, L.E., Lingireddy, S.: Calibrating hydraulic network models. AWWA 89, 42–50 (1997)

16. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A New Heuristic Optimization Algorithm: Harmony Search. Simulation 76, 60–68 (2001)

Page 140: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 135–145. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

The Application of Harmony Search in Fourth-Party Logistics Routing Problems

Guihua Bo12, Min Huang12, W.H. Ip3, and Xingwei Wang12

Abstract. A recently-developed meta-heuristic optimization method, called the Harmony Search (HS) has gained more and more attentions for the ability to solve large-scale, difficult combinational optimization problems. And, recently, fourth-party logistics (4PL) also has been receiving more and more attentions from the manufacturing and retail industries. In this chapter, we set up the mathematical model of fourth-party logistics routing optimization with time windows (4PLRPTW) based on a multi-graph, firstly, then reviews the application of HS in areas of 4PLRPTW. Three specific cases are considered: seven nodes, fifteen nodes, and thirty nodes problems. According to the character of 4PLRPTW, we also design the repair strategy. The performance of the HS is compared with the designed enumera-tion algorithm in this chapter. The results of the numerical experiments show that the HS is effective in terms of solution quality and computational time.

1 Introduction

This chapter mainly presents three different nodes problems in fourth-party logis-tics routing optimization with time windows (4PLRPTW), which includes seven nodes, fifteen nodes, and thirty nodes problems.

Research on fourth-party logistics routing problem (4PLRP) is in the beginning stage. There are few papers published about it. Chen et al [1] designed a genetic

Guihua Bo, Min Huang, and Xingwei Wang Faculty of Information Science and Engineering, Northeastern University, Shenyang, Liaoning, 110004, China E-mail: [email protected], {mhuang,wangxw}@mail.neu.edu.cn Guihua Bo, Min Huang, and Xingwei Wang Key Laboratory of Integrated Automation of Process Industry (Northeastern University), Ministry of Education, Shenyang, Liaoning, 110004, China W.H. Ip Department of Industrial and Systems Engineering, The Hong Kong Polytechnic University, Hung Hom, Kowloon, Hong Kong SAR, China E-mail: [email protected]

Page 141: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

136 G. Bo et al.

algorithm to solve 4PLRP with ten nodes. This paper introduced genetic algorithms to solve 4PLRP. However, the author only introduced the concept of 4PL in a sim-ple way, did not depict the problem with a standardized model and did not consider the property of nodes along the route. With respect to algorithm design the large-scale problem was not taken into account during the process. Huang et al. [2] set up a mathematical model based on nonlinear integer programming and multi-graphs and proposed an immune algorithm, with an embedded Dijkstra algorithm, to solve 4PL problems with seven nodes, fifteen nodes and thirty nodes. Huang et al. [3] suggested a hybrid immune algorithm to solve 4PL problems. These two papers have considered all the problems which were not considered in [1], but they did not consider the time window constraint.

The time window constraint has wide applicability in real-world cases, such as large-scale vehicle routing problems [4]. The time window is pre-set time con-straint on the period of the day in which delivery should take place. For maximiz-ing the satisfaction degree of customer we deal with 4PLRPTW in this chapter.

In the 4PLRPTW, the objective is to find a minimum-cost route which starts from the supply node, services a demand node which must be serviced within a specified time window. Since 4PLRP is an NP-hard [5] problem, the optimal solu-tion can not be obtained using exact methods in reasonable computation time, es-pecially when the problem scale is larger. But, heuristic methods often produce near optimal solutions in a reasonable amount of computation time. So we suggest a phenomenon-inspired HS algorithm developed by Geem et al. [6] be applied to it to solve 4PLRPTW, and designed the repair tactic.

2 Fourth-Party Logistics Routing Problems

The concept of Fourth-party Logistics (4PL) was originally introduced by Accen-ture, a famous management consulting company, who registered it as a proprietary trademark in 1998. A 4PL provider is a supply chain integrator that assembles and manages the resources, capacities and technology of its own organization together with those of complementary service providers, to deliver a comprehensive supply chain solution [7].

The way in which the route is selected is one of the most important problems in 4PL because it can save the transportation cost. This is different from the way the route is selected in third party logistics (3PL). The selection of 3PL providers should also be considered in the 4PLRP with regard to not only costs but also time, capacity and the reputation properties of 3PL providers. However, the selec-tion of a route and 3PL providers is not a step by step procedure, but a concurrent one as these parameters need to be considered at the same time, which increases the difficulty of solving routing problems in 4PL.

The main problem in 4PLRPTW is how to make decisions on the routing and 3PL providers so as to minimize the logistics costs, maximize the satisfaction de-gree of customers and 3PL providers’ benefits, and meeting the time windows pre-specified by customers.

Page 142: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

The Application of Harmony Search in Fourth-Party Logistics Routing Problems 137

2.1 Problem Formulation for Fourth-Party Logistics Routing Problems

The objective is to find a route Rt with minimum-cost (i.e., the sum of costs on all nodes and edges in the route Rt) as well as subject to constraints on customers’ pre-ferred time windows, 3PL companies’ reputation target, and capacity requirement.

We can use a graph to describe 4PLRPTW with a supply node vs and a demand node vt. Nodes in the graph represent depots, material warehouses, manufacturing plants, semi-product storehouses, assembly plants, sales locations, etc. Each node has the properties of cost, time and capacity. The demand node vt has a time win-dow constraint. Since there may exist several 3PL companies which can handle the transportation between any two nodes, there may be multiple edges between two nodes (one edge stands for a 3PL company), and each edge has the properties of cost, time, capacity and reputation. Figure 1 is a multi-graph for a 4PLRPTW with seven nodes, Figure 2 is fifteen nodes, and Figure 3 is thirty nodes problems.

The model of 4PLRPTW is set up as follows:

( ) ( )t

n

jj

'jt

n

i

n

j

r

kijkijk RyCRxC

ij

∑∑ ∑ ∑== = =

+11 1 1

min (1)

s.t 1 1 1 1

( ) ( )ijrn n n

'ijk jijk t tj

i j k j

a R R lyxT T= = = =

≤ + ≤∑∑∑ ∑ (2)

( ) 1 ; 1 ; 1ijk ijijk tL R i n j n kx P r≤ = = = (3)

( ) 1't jjL R P j ny′ ≤ = (4)

( ) 1 ; 1 ; 1ijk ijijk tR R i n j n kx D r≤ = = = (5)

( ), , , , , , , 1 ; 1t s i j kR v v k v v G i n j n= ∈ = = (6)

The specific definition of variables and parameters can refer to [8]. Equation (1) is the objective function including the cost of all the nodes and edges; (2) repre-sents the constraint of the sum of all the time needed in a route (both nodes and edges), which must be within the time window pre-specified by the customer; (3) represents the capacity constraint of the selected logistics company which is not less than the transportation capacity L required by the customer; (4) denotes the

capacity constraint of nodes along a route which is not less than the capacity 'L required by the customer; (5) denotes reputation constraint of selected logistics company which is not less than customer required R ; (6) is used to ensure that the selected route is a legal one.

Page 143: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

138 G. Bo et al.

2.2 Seven Nodes Example

We solve seven nodes network firstly which has one start node, five middle nodes, and one end node, as shown in Figure 1.

The number of total candidate designs is 61022.6 × , which is product of the number of all the values for each decision variable.

Table 1 shows the computational results of HS algorithm and enumeration al-gorithm. Results show that HS algorithm can get the same optimal solution as enu-meration algorithm of the problem with seven nodes and only take 0.6 seconds, which is faster than the enumeration algorithm.

Fig. 1 Multi-graph of seven nodes network

Table 1 Results of Seven Nodes Network

Algorithms Minimal Cost Time (seconds)

Harmony Search

Enumeration Algorithm

73

73

0.6

3

2.3 Fifteen Nodes Example

Now, we solve fifteen nodes network which has one start node, thirteen middle nodes, and one end node, as shown in Figure 2.

The number of total candidate designs is 191012.3 × , which is product of the number of all the values for each decision variable.

Table 2 shows the computational results of HS algorithm and enumeration al-gorithm. From the results we can see that HS algorithm can get the optimal solu-tion in 1.5 seconds, but the enumeration algorithm can not find the solution even after 8640000 seconds.

12

2

2

2

2

2

2

22

2

2

2

3

3

3

33

3

3

4

4

1

1

1 11

1 1

1

1

1

1

sv

tv

1v

2v

3v

4v

5v

Page 144: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

The Application of Harmony Search in Fourth-Party Logistics Routing Problems 139

Fig. 2 Multi-graph of fifteen nodes network

Table 2 Results of Fifteen Nodes Network

Algorithms Minimal Cost Time (seconds)

Harmony Search

Enumeration Algorithm

115

\

1.5

>8640000

2.4 Thirty Nodes Example

Finally, we solve thirty nodes network which has one start node, twenty-eight middle nodes, and one end node, as shown in Figure 3.

The number of total candidate designs is 401006.5 × , which is product of the number of all the values for each decision variable.

Fig. 3 Multi-graph of thirty nodes network

s2

1

3

4

5

6

7

8

9

10

11

12

13

t

s

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

t

Page 145: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

140 G. Bo et al.

Table 3 shows the computational results of HS algorithm and enumeration al-gorithm. From the results we can know that HS algorithm can get the optimal so-lution in 23 seconds, but the enumeration algorithm can not find the solution even after 12960000 seconds.

Table 3 Results of Thirty Nodes Network

Algorithms Minimal Cost Time (seconds)

Harmony Search

Enumeration Algorithm

€€ 3.738 M

€€ 3.476 M

23

12960000

3 Algorithm Design

The HS algorithm has been successfully applied to various industrial optimization problems [9]. For instance, the traveling salesperson problem [8], generalized ori-enteering problem [10], and optimal school bus routings [11], etc.

The optimization procedure of the HS algorithm is shown in Figure 4. The HS algorithm consists of encoding and decoding, initializing the optimization problem and algorithm parameters, initializing the harmony memory (HM), improvising a new harmony from the HM, updating the HM, checking termination criterion, and repairing the solution.

In this paragraph, we mainly introduce the encoding and decoding scheme and repair strategy because the other procedure is same to the standard HS algorithm, and then introduce the enumeration algorithm which is used to compare with the HS.

3.1 Encoding and Decoding

In this study we adopt the integer number encoding scheme. Firstly, let us repre-sent the graph of the problem with a matrix which is symmetrical. If there is no edge between the two nodes, the value of the corresponding element in the matrix is set to 0; otherwise the element value is set to the number of edges between the two nodes. Secondly, a digital string according to the non-zero elements in the up-per triangular part of the matrix is constructed from left to right, top to bottom. The length of the digital string is the coding length of the corresponding problem, and the value of each digit is limited by the supremum of the coding. If an edge is selected out of edges between two nodes in a route, the index number of the edge is used as its code. The code whose edge is not in the route is set to 0. A valid route must be a connected route starting with node sv and ending with node tv .

Taking Figure 1 as an example, with the assumption of being a valid multi-graph after pre-processing (removing edges and nodes that do not satisfy the con-ditions), the matrix for Figure 1 is as follows:

Page 146: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

The Application of Harmony Search in Fourth-Party Logistics Routing Problems 141

Fig. 4 Harmony search algorithm optimization procedure

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

0223000

2002400

2003020

3230320

0403024

0022203

0000430

t

5

4

3

2

1

s

t54321s

(7)

Initialize the optimization problem and algorithm parameters. Spec-

ify each decision variable, the possible value range for each decision

variable, harmony memory size (HMS), harmony consideration rate

(HMCR), pitch adjusting rate (PAR), termination criterion (maximum number of searches)

Initialize the harmony memory (HM). Generate initial harmony (so-lution vector) as many as the value of (HMS) will allow

Improvise a new harmony from HM based on memory consideration, pitch adjustments, and randomization

New harmony better than the harmony stored in HM?

Update HM

Termination criterion sat-

isfied?

Stop

Y

Y

N

N

Page 147: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

142 G. Bo et al.

The length of the digital string 342223432322 is 12. Each digit is set to its su-premum. Given the string 200100000300, we can know the corresponding matrix of the string from the equation (8). The string stands for the route with node s, 1, 3 and t; the edges between the pairs of nodes are 2, 1 and 3 respectively; and the route is ),3,,,2,( 31 tst vvvvR = .

⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢

0003000

0000000

0000000

3000010

0000000

0001002

0000020

t

5

4

3

2

1

s

t54321s

(8)

3.2 Repairing Solution Vector

The solution vector generated using HS may be invalid, so we need to adjust the solution vector to ensure that it is a connective route. Our aim is to find a legal route. Taking Figure 1 as an example, each node has an adjacent-node-set:

};,5,4,2,1{};4,3,2{};4,3,2{};2,1{ 321 tdddds ==== };,3,1{4 td = };,3,2{5 td =

Similarly, for the solution generated randomly, each node has an adjacent-node-set iD , and },,3,2,1{ tM = is the set of all the nodes except the start node s . For

example, the solution vector 200102030010, Φ====== 54321 };,3{};4,2,1{};3{};3,{};1{ DtDDDsDDs .

(a): For the start node s :

0=sD : sdi ∈∀

If all the Φ=iD , then randomly select one sdi ∈

Else, randomly select one i and Φ≠iD .

Then give sie a non-zero value, }{iMM −= and go to (b).

1=sD : Let }{sDD ii −= , sDi ∈ , }{iMM −= , apply the edge sie , and then

go to (b). 2≥sD : sDi ∈∀ , let }{sDD ii −= .

If all the Φ=iD randomly select one sdi ∈ , and apply the edge sie .

Else, randomly select one i and Φ≠iD , and apply the edge sie . Then

let 0=sje sDj ∈ , and ij ≠ , }{iMM −= , and go to (b).

(b): For node i :

0=iD :

If idt ∈ give ite a non-zero value, let }{tMM −= , and go to (c).

Page 148: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

The Application of Harmony Search in Fourth-Party Logistics Routing Problems 143

Else, idj ∈∀ ; if all the Φ=jD , randomly select one idj ∈ ,

Else, randomly select one j and }{Φ≠jD .

Then give ije a non-zero value, }{ jMM −= , let ji = , and go to repeat (b).

1=iD : }{iDD jj −= and iDj ∈ , }{ jMM −= , let ji = , and go to repeat (c).

2≥iD :

If iDt ∈ , let 0=ije , }{iDD jj −= iDj ∈ and tj ≠ , }{ jMM −= , and go to (c).

Else, iDj ∈∀ , let }{iDD jj −= ,

If all the Φ=iD randomly select one iDj ∈ ,

Else, randomly select one iDj ∈ and Φ≠iD ,

Then let 0=jke , iDk ∈ , and jk ≠ , }{iMM −= , let ji = , and go to repeat (b).

(c): For node t : Mi ∈∀ , Φ≠∈ iDj , let 0=ije .

Fig. 5 Enumeration algorithm procedure

3.3 Enumeration Algorithm

We design the enumeration algorithm based on the characteristic of our problem. The procedure is:

Enumerate a simple-graph

Find a minimum-cost route using Dijkstra algorithm

Meet time window?

Compare the value of the shortest route and update the value

Enumeration is over?

Stop

Y

N

N

Y

Page 149: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

144 G. Bo et al.

1) First, we enumerate a simple-graph based on the multi-graph. 2) Then, we find a minimum-cost route meeting time windows constraint using

Dijkstra algorithm.

Figure 5 shows the procedure of the enumeration algorithm.

4 Conclusions and Summary

This chapter has described the HS application in areas of 4PLRPTW. Specific ex-perimental cases consist of seven nodes, fifteen nodes, and thirty nodes problems.

We set up the mathematical model for the 4PLRPTW, and then applied HS to the NP-hard 4PLRPTW problem. We also suggested the repair strategy. Various node examples were compared with enumeration algorithm to demonstrate the ef-fectiveness and robustness of the HS algorithm. The results of different scale ex-amples revealed that the HS algorithm was capable of finding the global optimum within a reasonable amount of time.

Of course, the HS algorithm is not limited to 4PLRPTW that treats discrete variables. It can be easily used for problems with continuous variables.

With the success of HS application in fourth-party logistics routing problems, in the future, we can focus on applying the HS into the routing problems with soft time windows and further improving the HS algorithm, such as integrating the HS algorithm with other algorithm.

References

1. Chen, J.Q., Li, X., Liu, W.H.: Directed graph optimization model and its solving method based on genetic algorithm in fourth party logistics. In: The IEEE International Conference on Systems, Man and Cybernetics, vol. 2, pp. 1961–1966 (2003)

2. Huang, M., Tong, W., Wang, Q., et al.: Immune algorithm based routing optimization in fourth-party logistics. In: IEEE Congress on Evolutionary Computation, pp. 3029–3034 (2006)

3. Huang, M., Bo, G.H., Tong, W., et al.: A hybrid immune algorithm for solving fourth-party logistics routing optimizing problem. In: Proceedings of 2008 IEEE Congress on Evolutionary Computation, pp. 286–291 (2008)

4. Mester, D., Braysy, O.: Active guided evolution strategies for large-scale vehicle rout-ing problems with time windows. Computers & Operations Research 32, 1593–1614 (2005)

5. Lau, H.C., Lo, Y.T.: A multi-agent framework for supporting web-based intelligent fourth party logistics. In: Proceedings of the First International Conference on Inte-grated Logistics, pp. 195–200 (2001)

6. Geem, Z.W., Kim, J.-H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001)

7. John, G.: Strategic supply chain alignment. Beijing, China (2003) 8. Bo, G.H., Huang, M., Ip, W.H., et al.: The harmony search for the routing optimization

in fourth party logistics with time windows. In: IEEE Congress on Evolutionary Com-putation, pp. 962–967 (2009)

Page 150: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

The Application of Harmony Search in Fourth-Party Logistics Routing Problems 145

9. Geem, Z.W.: Harmony search applications in industry. In: Prasad, B. (ed.) Soft com-puting applications in industry. Springer, Berlin (2008)

10. Geem, Z.W., Tseng, C.-L., Park, Y.: Harmony search for generalized orienteering problem: Best touring in china. In: Wang, L., Chen, K., S. Ong, Y. (eds.) ICNC 2005. LNCS, vol. 3612, pp. 741–750. Springer, Heidelberg (2005)

11. Geem, Z.W., Lee, K.S., Park, Y.: Application of harmony search to vehicle routing. American Journal of Applied Sciences 2, 1552–1557 (2005)

Page 151: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 147–161. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

A Harmony Search with Multi-pitch Adjusting Rate for the University Course Timetabling

Mohammed Azmi Al-Betar, Ahamad Tajudin Khader, and Iman Yi Liao*

Abstract. Course timetabling is a challenging administrative task for the educa-tional institutions which have to painstakingly repeat the process several times per year. In general, course timetabling refers to the process of assigning given events to the given rooms and timeslots by taking into consideration the given hard and soft constraints. To tackle a highly-constraint timetabling problem, a powerful and robust algorithm that can deal with multidimensional gateways is required. Recently, the harmony search algorithm has been successfully tailored for the university course timetabling problem. In this chapter, the application of harmony search for the course timetabling is further enhanced by dividing the pitch adjustment operator to eight procedures, each of which is controlled by its PAR value range. Each pitch adjustment procedure is responsible for a particular local change in the new harmony. Furthermore, the acceptance rule for each pitch adjustment procedure is changed to accept the adjustment that leads to a better or equal objective function. Standard benchmarks are used to evaluate the proposed method. The results show that the proposed harmony search is capable of provid-ing high-quality solutions compared to those in the previous works.

1 Introduction University timetabling is a challenging administrative task that usually baffles the academic institutions and it has to be repeated several times per year. It consists of scheduling given events, each with given features, to the given resources and time-slots according to the given hard and soft constraints[1]. Typically, the timetabling solution is evaluated according to the hard and soft constraints. Hard constraints are essential to be satisfied to produce a feasible timetable while soft constraints are desired but not absolutely essential. The soft constraints might be violated but the more they are satisfied in the timetabling solution, the better is the quality of the solution. University timetabling is normally divided into two problems[2]: ex-amination timetabling problem and course timetabling problem. In this chapter, the later is considered.

The university course timetabling problem (UCTP) has attracted the attention of the artificial intelligence and operational research communities for quite a long time. Many approaches have been proposed to tackle this problem. As the basic timetabling problem can be modelled as a graph colouring problem[3], the earliest approaches depended on the graph colouring heuristics. These heuristics built Mohammed Azmi Al-Betar, Ahamad Tajudin Khader, and Iman Yi Liao School of Computer Sciences, Universiti Sains Malaysia, 11800 USM, Penang, Malaysia E-mail: {mohbetar,tajudin,iman}@cs.usm.my

Page 152: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

148 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

timetables by assigning events to timeslots and rooms, one by one according to the difficulty level of the scheduling in the solution. Nowadays, they are often used to find feasible timetables in other methods[4, 5], and also used as low-level heuris-tics in hyper heuristics methods[6, 7].

The metaheuristic methods have a notable success rate in solving difficult time-tabling problems[8, 9]. They are usually categorized into two: population-based methods and local search-based methods[10]. The population-based methods con-sider many solutions at the same time. Iteratively, they recombine the characteris-tics of the current solutions to produce new ones. Among the population-based methods applied in the UCTP are Genetic Algorithms[11], Ant Colony Optimiza-tion[12], Artificial Immune System[13], and Harmony Search Algorithm[14].

The local search-based methods consider one solution at a time[10]. The cur-rent solution is improved during the search using neighbourhood structures guided by a given acceptance rule, until a stand-still point near the initial solution is ob-tained. The key components of these algorithms are the definition of the neighbourhood structures. The more the neighbourhood structures are connected to the search space, the more the convergence rate increases [15]. The term con-nected to the search space refers to the existing path between any two solutions in the search space that apply a sequence of valid moves [15, 16]. The local search-based methods applied in the UCTP include Iterative Local Search[17], Simulated Annealing[16], Very Large Neighbourhood Search[18, 19], Great Deluge [20, 21].

The hybridization between population-based and local-search based is also a very promising research trend in the timetabling domain[10, 22]. This includes the Hybrid Evolutionary Algorithm [5, 23], Hybrid Harmony Search Algorithm[24], and Evolutionary Great Deluge[25]. Overview of the previous approaches in the UCTP are available in many surveys, as in [1, 2, 8, 9, 26].

The harmony search algorithm (HSA) has the advantage of population-based method whereby it recombines the characteristics of many solutions at the same time to obtain a solution called the ‘new harmony’. This is done by using two op-erators: memory consideration and randomness. On the other hand, HSA also has the advantage of local-search based method whereby it fine-tunes the solution us-ing a pitch adjustment operator[27].

In the authors’ previous works[14, 24, 27], the harmony search algorithm (HSA) was successfully tailored for the UCTP. The pitch adjustment operator was designed similar to a neighbourhood structure where it is divided into two proce-dures with random acceptance rule. There are two main objectives of this chapter: Firstly, to define more pitch adjustment procedures for the UCTP, where each is controlled by a specific PAR value range to further enhance the ability of HSA to connect the UCTP search space more efficiently. Secondly, to change the accep-tance rule of these procedures to accept the local change on the new harmony, if the objective function is not negatively affected.

2 University Course Timetabling Problem

The UCTP considered in this chapter was initially defined by the Metaheuristics Network1 (MN), a European commercial research project shared by five European 1 http://www.metaheuristics.net/

Page 153: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 149

institutions from 2000 to 2004. The objective of this research project is to investi-gate the efficiency of different metaheuristics on different combinatorial optimiza-tion problems. The UCTP of MN was discussed by Rossi-Doria et al.[17] as the problem of assigning given events to suitable rooms and timeslots according to hard and soft constraints. This problem includes three hard constraints and three soft constraints as follows:

H1. Event Conflict: Students must not be double booked for events. H2. Room availability: Room capacity and features must be suitable for the assigned events. H3. Room occupancy: Rooms must not be double booked for events. S1. Last period of a day: A student shall not have an event in the last time-slot of the day. S2. More than two events in a row: A student shall not have more than two events in a row. S3. Single event in a day: A student shall not have a single event in a day.

The main objective of UCTP is to minimize the number of soft constraint vio-lations in a feasible timetable.

2.1 Problem Modelling

The UCTP consists of a set of n events, },...,,{ 21 neeeE = each of which is at-

tended by students and demanded specific room features; a set of m rooms, },...,,{ 110 −= mrrrR each of them has specific seats capacity and features; a set of p

timeslots, },...,,{ 110 −= ptttT where 45=p (5 working days, each with 9 time-

slots); a set of z room features, },...,,{ 110 −= zfffF ; a set of v students,

},...,,{ 110 −= vsssS each of them attends one or more events.

The symbols and variables used in UCTP modelling are shown in Table 1. The timetable solution is represented by a vector, ),...,,( 21 nxxx=x of events; each event

must be scheduled in a feasible location within the range of ]1,0[ −× pm , where

each location is a map of room-timeslot pair. Each location is interrupted by Eq.(1).

kpjxi +×= . (1)

Where j is the index of room jr and k is the index of timeslot kt . For example,

let 400=n , 45=p , and 10=m be the number of events, timeslots, and rooms,

respectively. The available range for each event location is within [0, 449]. Let ,...)55,194,320(=x be a complete and feasible timetable. The event, 1x is sched-

uled by location 320 in timeslot, kt of index 5 at room, jr of index 7; the event,

2x is scheduled by location 194 in timeslot, kt of index 14 at room, jr of index 4;

etc. The timeslot index is extracted from the location of the event, ix shown in Eq.

(2) and the room index is extracted from the same location as shown in Eq. (3).

Page 154: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

150 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

pxt ik mod = (2)

⎥⎦

⎥⎢⎣

⎢=

p

xr i

j (3)

Definition 1. The location l is feasible for event ix to be scheduled in the

timetable x if and only if the following conditions are met: 1. lx j ≠ x∈∀ jx .

2. 1,

=⎥⎦

⎥⎢⎣

⎢p

xi i

q .

3. pxpx ij mod mod ≠ jicx jij ≠∧=∧∈∀ 1 ,x .

Given the notations in Table 1, the UCTP for a timetable solution, x can be formally described. The objective function in Eq.(4) includes the penalty cost of the three defined soft constraints in a feasible timetable that satisfies three defined hard constraints and can be modelled as follows:

)),(),(),(()( Minimize 32

1

01 sfsfsff

v

s

xxxx ++= ∑−

= (4)

Subject to • H1. Event Conflict. jipxpxxx ijji ≠∧=∧∈∀ mod mod , x

0, =jic .

• H2. Room availability. x∈∀ ix

1,

=⎥⎦

⎥⎢⎣

⎢p

xi i

q .

• H3. Room occupancy. This hard constraint is always satisfied using this pro-posed solution representation.

• S1. Last period of a day. Ss∈∀

∑−

=−+×=

1

01)1(,1 ),(

d

jjhssasf x

• S2. More than two events in a row. Ss∈∀

∑∑−

=

=++×++×+× ××=

1

0

3

02,1,,2 ),(

d

i

h

jjhisjhisjhis sasasasf x

• S3. Single event in a day. Ss∈∀

∑−

==

1

0,3 ),(

d

jjsasf x Where

⎪⎩

⎪⎨⎧

= ∑−

=+×

0

11

0,

,

otherwise

saa

h

iihjs

js ]1,0[ −∈∀ dj

Page 155: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 151

Table 1 Notations used for the UCTP modelling

Symbols Description

n The number of events.

m The number of rooms.

d The number of working days per week.

h The number of timeslots per working day.

p The number of timeslots where p = 45(d = 5 working days with h = 9 timeslots on each).

z The number of features.

v The number of students.

E Set of events, },...,1|{ nieE i == .

R Set of rooms, }1,...,0|{ −== mifR i .

T Set of timeslots, }1,...,0|{ −== pitT i .

F Set of features, }1,...,0|{ −== zifF i .

S Set of students, }1,...,0|{ −== visS i .

ib The number of students attending event, ie .

ig The seat capacity of room, ir .

jiw ,

⎩⎨⎧

= 0

feature requires event if 1, otherwise

few ji

ji

jiy ,

⎩⎨⎧

= 0

feature contains room if 1, otherwise

fry ji

ji

jiu ,

⎩⎨⎧

= 0

event toattends student if 1, otherwise

esu ji

ji

jic , Conflict matrix. Whether event ie and event je conflict each other.

⎩⎨⎧ ∈∀=∧=

= 0

1),(1)( if 1 ,,, otherwise

Skuuc jkik

ji

jiq , Event-room matrix. Whether event ie and room jr are compatible in features and capacity.

⎩⎨⎧ ∈∀≤∧=

= 0

,)()( if 1 ,,, otherwise

Fkgbywq jikiki

ji

ix Event ie is scheduled by a feasible location l in the timetable x.

kjsa , Student availability matrix. Whether student js in timeslot kt in the current timetable x.

⎩⎨⎧ =

==∧∈∀ 0

1 if 1 , mod , otherwise

usapxkx j,i

kjii x

Page 156: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

152 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

No

Yes

Stop

No

Improvise new harmony solution

If new harmony solution better than

the worst harmony in harmony memory

Step 1

Step 2

Step 3

Step 4

Step 5

I- Initialize harmony search parameters 1. Harmony Memory Consideration Rate (HMCR) 2. Pitch Adjacent Rate ( PAR ) 3. Harmony Memory Size( HMS ) 4. Number of Improvisations( NI )

II- Initialize timetabling parameters (Rooms, Courses, Timeslots, Features, etc.)

I- Initialize harmony memory. II- Generate random feasible initial timetables

depending on HMS. III- Store them to harmony memory

Is Improvisation loop less than

NI

Update harmony memory

Yes

Fig. 1 The HSA steps for UCTP

3 Designing Harmony Search for UCTP

The harmony search algorithm (HSA) is a new metaheuristic population-based algorithm developed by Geem et al. [28]. It mimics the musical improvisation process, where a group of musicians improvise the pitches of their musical in-struments, practice after practice, seeking for a pleasing harmony as determined by an audio-aesthetic standard. This can be translated into optimisation process as follows: a set of decision variables is assigned with values, iteration by iteration, seeking for a ‘good enough’ solution, as evaluated by an objective function.

Fig.1 describes the five steps of HSA with application to the UCTP. It has to be borne in mind that this chapter considers the feasible search space region. There-fore, some of the HSA steps and operators had to be modified to preserve the fea-sibility. The following is a detail and thorough explanation of the five steps of HSA with application to UCTP.

Page 157: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 153

Step.1. Initialize the HSA and UCTP parameters The UCTP parameters which are discussed in Section 2.1 are normally extracted from the problem instances. These parameters include the set of events, the set of rooms, the set of timeslots, the set of features, etc. The main decision variable of UCTP is the events. Each event can be scheduled by a feasible location in the timetable solution. A set of all feasible locations can be considered as the available range of such events. In fact, the feasible location of each event changes during the improvisation process of HSA.

The objective function described in Eq.(4) is utilized to evaluate each solu-tion during the HSA process which includes the functions of the three soft constraints.

In this step, the HSA parameters used for UCTP are selected. That is, the Har-mony Memory Size (HMS) which is similar to the population size in genetic algo-rithms; Number of Improvisation (NI) which is similar to the number of iterations; Harmony Memory Consideration Rate (HMCR); and Pitch Adjustment Rate (PAR). Note that the HMCR and PAR are the two parameters responsible for the improvisation process. These parameters will be explained in more detail in the next steps.

Step.2. Initialize the harmony memory The harmony memory (HM) is a memory location which contains sets of solution vectors which are determined by HMS (see Eq.5). In this step, these vectors are heuristically constructed and stored in the HM in ascending order, based on the

objective function values, such that )(...)()( 21 HMSfff xxx ≤≤≤ .

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

=

HMSn

HMSHMS

n

n

xxx

xxx

xxx

...

......

...

...

21

222

21

112

11

HM (5)

The feasibility for all HM timetabling solutions is maintained with a method that combines the largest weighted degree (LWD), backtracking algorithms, and the MultiSwap algorithm[14].

Step 3. Improvise a new harmony The HSA constructs a new harmony timetable solution, ),...,,( 21 nxxx' ′′′=x from

scratch based on three operators: (1) memory consideration. (2) random considera-tion, and (3) pitch adjustment. If a complete new harmony is not obtained, then the repair process takes over [14].

The feasibility of the new harmony must be maintained through the search. As such, a feasibility matrix is proposed, as in Definition 2.

Page 158: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

154 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

Definition 2. Feasibility matrix is a binary matrix FM of size HMSn × where jifm , changes iteratively during the improvisation process which con-

tains either 1, =jifm , if and only if an event, i has a feasible location in the

solution, j that is stored in HM to be scheduled in a new harmony solution or if 0, =jifm otherwise. This matrix is initialized by 1 at the beginning of the

improvisation process. It is also updated when an event is scheduled out of memory consideration or random consideration, or adjusted by pitch ad-justment procedures.

In UCTP, the smallest position algorithm [14] is used to arrange the events ac-cording to the difficulty level of the scheduling in the new harmony solution; the events that have the least feasible locations in the HM solutions to be scheduled in

the new harmony, must be selected first. Formally, let ∑ == HMS

j jkk fmsum1 , be the

total number of feasible locations of event kx , the smallest position algorithm se-

lects event ix′ such that

knksumi

...1minarg=

=

If there is more than one event at each iteration with the same least feasible loca-tions, the proposed algorithm selects one event based on the LWD heuristic method.

Memory Consideration. Every event selected by smallest position algorithm is scheduled in the new harmony solution by randomly selecting a feasible location from the solutions stored in HM, with the probability of HMCR[14]. In the au-thors’ previous work [24], the memory consideration was modified to always mimic the best solutions stored so far in the HM, that has feasible locations for all the events. This is inspired by the Practical Swarm Optimisation (PSO)[29]. For-

mally, let’s set ]},1[,1|{ , HMSjfmx jij

ii ∈∀==Η , where ],1[ ni ∈ and FM∈jifm , ,

contain the feasible locations of event ix′ to be scheduled in the new harmony from

the solutions stored in HM. Let’s set,

⎭⎬⎫

⎩⎨⎧ ==Ζ

Η∈)(minarg

s.t.

k

xk

ji

best fjxi

ki

x

where it contains all the feasible locations for all the events from the best solutions stored in HM. The location of event, ix′ is selected from the best solution stored so far

in HM, that has a feasible location for ix′ such that jii xx =′ where )( bestj

ix Ζ∈ with

the probability of HMCR.

Random Consideration. The remaining events that have not been scheduled by memory consideration will select any feasible location available to be scheduled in the new harmony solution with the probability of (1-HMCR). Formally, let event, ix′ be selected by the smallest position algorithm to be scheduled in the new

Page 159: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 155

harmony solution. Let’s set }for location feasible is |{ ixll ′=Ρ , where the event,

ix′ is scheduled in any feasible location in set Ρ with the probability of (1-

HMCR).

Pitch Adjustment. Every event, ix′ of a new harmony vector, ),...,,( 21 nxxx' ′′′=x ,

that has been scheduled out of memory considerations is examined to view if it should be pitch adjusted with the probability of PAR where 10 ≤≤ PAR , as in Eq.(6).

⎩⎨⎧

−=′

PARNo

PARYesxi 1 w.p.

.p.w (6)

For UCTP, the pitch adjustment operator is designed to work similar to the neighbourhood structures in the local search-based methods, where the pitch adjustment operator is divided into eight procedures: (1) the pitch adjustment move-timeslot, (2) the pitch adjustment Swap-timeslot ,(3) the pitch adjustment move-location,(4) the pitch adjustment swap-location,(5) the pitch adjustment ex-change-location, (6) the pitch adjustment swap-distinct-timeslots, (7) the pitch adjustment move-room, and (8) the pitch adjustment Swap-room. Each of these procedures is controlled by a particular PAR range, as shown in Eq. (7).

⎪⎪⎪⎪⎪⎪

⎪⎪⎪⎪⎪⎪

≤<××≤<××≤<××≤<××≤<××≤<××≤<××≤<×

×≤<

=′

1)1,0(80.0

80.0)1,0(70.0

70.0)1,0(60.0

60.01050.0

50.01040.0

40.01030.0

30.01020.0

20.01010.0

10.0100

UPARdo nothing

PARUPARSwap-room

PARUPARmove-room

PAR),U(PARots nct-timeslswap-disti

PAR),U(PAR ocation exchange-l

PAR),U(PAR ion swap-locat

PAR),U(PAR ion move-locat

PAR),U(PAR lot Swap-times

PAR),U( lot move-times

xi (7)

Where U(0,1) generates a uniform random distribution between 0 and 1. The pro-posed pitch adjustment procedures are designed to work as follows:

1. The pitch adjustment move-timeslot. An event, ix′ that meets the probability of

10%×PAR is randomly moved to any feasible timeslot where the room is not changed.

2. The pitch adjustment Swap-timeslot. An event, ix′ , that meets the probability

between 10%×PAR and 20%×PAR is swapped with the timeslot of another event, (say jx′ ) while the rooms of both events are not changed.

3. The pitch adjustment move-location. An event, ix′ , that meets the probability

between 20%×PAR and 30%×PAR is randomly moved to any free feasible lo-cation in the new harmony solution.

Page 160: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

156 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

4. The pitch adjustment swap-location. An event, ix′ , that meets the probability

between 30%×PAR and 40%×PAR is randomly swapped with another event (say jx′ ) while the feasibility is maintained.

5. The pitch adjustment exchange-location. An event, ix′ , that meets the probabil-

ity between 40%×PAR and 50%×PAR is randomly exchanged with another two events (say jx′ and kx′ ) while the feasibility is maintained.

6. The pitch adjustment swap-distinct-timeslots. An event, ix′ , that meets the

probability between 50%×PAR and 60%×PAR is adjusted as follows: (1) select all the events that have the same timeslot, (say jt ) as event ix′ . (2) select a

timeslot in random (say kt ). (3) simply swap all the events in timeslot, jt with

all the events in other timeslot, jt without changing the rooms.

7. The pitch adjustment move-room. An event, ix′ that meets the probability be-

tween 60%×PAR and 70%×PAR is moved to any free feasible room while the timeslot is not changed.

8. The pitch adjustment Swap-room. An event, ix′ that meets the probability be-

tween 70%×PAR and 80%×PAR swaps its room with a room of another event in the same timeslot while reserving the feasibility.

The original HSA [30] adjusts the decision variables that meets a probability of PAR randomly without checking whether the objective function is affected. In UCTP, the numbers of events (or variables) are considerable and the correlation between them is high. As such, the acceptance rule of the pitch adjustment proce-dures is changed to work, as follows: the adjustment done by each pitch adjust-ment procedure is accepted if and only if the objective function value of the new harmony is not negatively affected.

Step 4. Update the harmony memory If the new harmony vector, ),...,,( 21 nxxx' ′′′=x , is better than the worst harmony

stored in HM in terms of the objective function value, the new harmony vector is added to the HM and the worst harmony vector is deleted from the HM.

Step 5. Check the stop criterion Step 3 and step 4 of HSA are repeated until the stop criterion (maximum number of improvisation) is met. This is specified by NI parameter.

4 Experimental Results

The proposed method is evaluated by using the UCTP data instances which is made available for free at ‘http: //iridia.ulb.ac.be/ msampels/tt.data/’ by Socha et al.[17]. For the purpose of this study, let’s call this the ‘Socha benchmark’. The 11 problem instances have different levels of complexity and are in various sizes. They are grouped into five small problem instances (S1,…,S5), five medium problem in-stances (M1,…,M5) and one large problem instance (L), as shown in Table 2. The

Page 161: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 157

solution to all the problem instances must satisfy the defined hard constraints stated in Section 2. Furthermore, the solution cost is measured by the defined soft con-straints violation as described in Eq.(4).The proposed methods are coded in Micro-soft Visual C++ 6 on Windows XP platform which ran on Intel 2 GHz Core 2 Quad processor with 4 GB of RAM.

Socha’s problem instances were experimented using different settings of pa-rameter values, as shown in Table 3. Each problem instances ran ten times in a different random seed, and the best problem cost obtained for all problem in-stances is reported in Table 4.

Table 2. The characteristics of each class of Socha benchmarks [15]

Class Small Medium Large

number of events 100 400 400

number of rooms 5 10 10

number of features 5 5 10

number of students 80 200 400

number of timeslots 45 45 45

approximate feature per room 3 3 5

percentage of feature use 70 80 90

maximum number of events per student 20 20 20

maximum number of students per event 20 50 100

Table 3. The parameter values of the proposed HSA

Parameter NI HMS HMCR PAR

Value 100000 10 99% 100%

The results are compared with those in the literature mentioned below that used the same Socha benchmarks, as shown below:

RRLS (2002) - Random Restart Local Search [17]. MMAS (2002) - MAX-MIN Ant System [17]. THH (2003) - Tabu-search Hyper Heuristic [6]. VNS (2005) - Variable Neighbourhood search[19]. FMHO (2005) - Fuzzy Multiple Heuristic Ordering[4]. GHH (2007) - Graph-based Hyper-Heuristic[7]. RII( 2007) - Randomised Iterative Improvement [18]. HEA (2007) - Hybrid Evolutionary Approach [5]. EGD (2008) - Extended Great Deluge [21]. HSA (2008) - Harmony Search Algorithm [14]. GD (2008) - Great Deluge[20]. NGD (2008) - Non-Linear Great Deluge[20]. GALS (2008) - Genetic Algorithm and Local Search [23].

Page 162: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

158 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

ENGD (2009) - Evolutionary Non-linear Great Deluge [25]. NGDHH-SM (2009) - Great Deluge Hyper-Heuristic –Static Memory [31]. NGDHH-DM (2009) - Great Deluge Hyper-Heuristic-Dynamic Memory[31]. EFDRGD (2009) - Electromagnetism Mechanism Great Deluge[32]. HHSA (2009) - Hybrid Harmony Search Algorithm[24]. MHSA (To appear) - Modified Harmony Search Algorithm [27].

Table 4 shows the solution costs of the proposed method in terms of the num-ber of soft constraints violations compared with those that appeared in the pre-vious methods using the same Socha benchmark. The best solution costs are highlighted while ‘#’ indicates that the method could not find a feasible timeta-ble solution for the Socha benchmark. The methods in bold line are the varia-tions of HSA applied to UCTP.

It is apparent that the proposed method is able to obtain feasible solutions for all Socha benchmarks. Furthermore, it is able to obtain high quality solutions in comparison with previous methods. Fig.2 shows a clear comparison with some methods that are able to produce feasible solutions for all Socha benchmarks which are marked with ‘+’ in the last column of Table 4; the total number of solu-tion costs is used as a factor of comparison. The proposed method outperforms the previous works in the total solution costs of all Socha benchmarks.

Table 4. Comparison with previous works

S1 S2 S3 S4 S5 M1 M2 M3 M4 M5 L Total

Proposed Method 0 0 0 0 0 124 117 190 132 73 424 1060+

RRLS(2002) 8 11 8 7 5 199 202.5 # 177.5 # # 618-

MMAS(2002) 1 3 1 1 0 195 184 284 164.5 219.5 851.5 1904.5+

THH(2003) 1 2 0 1 0 146 173 267 169 303 1166 2228+

VNS(2005) 0 0 0 0 0 317 313 375 247 292 # 1544-

FMHO(2005) 10 9 7 17 7 243 325 249 285 132 1138 2422+

GHH(2007) 6 7 3 3 4 372 419 359 348 171 1068 2760+

RII(2007) 0 0 0 0 0 242 161 265 181 151 # 1000-

HEA(2007) 0 0 0 0 0 221 147 246 165 130 529 1438+

EGD (2008) 0 0 0 0 0 80 105 139 88 88 730 1230+

HSA (2008) 5 3 2 3 1 316 243 255 235 215 # 1278-

GD (2008) 17 15 24 21 5 201 190 229 154 222 1066 2144+

NGD(2008) 3 4 6 6 0 140 130 189 112 141 876 1607+

GALS(2008) 2 4 2 0 4 254 258 251 321 276 1026 2398+

ENGD(2009) 0 1 0 0 0 146 147 185 116 129 821 1545+

NGDHH-SM (2009) 0 0 0 0 0 71 82 137 55 106 777 1228+

NGDHH-DM (2009) 0 0 0 0 0 87 88 112 84 103 915 1389+

EFDRGD (2009) 0 0 0 0 0 96 96 135 79 87 683 1176+

HHSA (2009) 0 0 0 0 0 105 102 135 122 123 671 1258+

MHSA (To appear) 0 0 0 0 0 168 160 176 144 71 417 1136+

Page 163: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 159

Fig. 2 Comparison of results with previous methods

5 Conclusions and Future Research

In this chapter, the HSA with multi-pitch adjusting rate is presented to tackle the UCTP. The proposed method enhanced the solution quality further by means of fine-tuning the search space region of new harmony in each iteration. Eight pitch adjustment procedures were proposed, each of which is controlled by a particular PAR range. Furthermore, each pitch adjustment procedure accepts the adjustments that meet the parameter value if the objective function is not negatively affected. The results show that the proposed modification is able to obtain high quality solutions in comparison with previous methods that tackled eleven Socha bench-marks. The authors believe that the HSA is very valuable with a significant poten-tial in the domain of scheduling. For future research, the HSA can be applied on other timetabling problems like examination timetabling, nurse rostering, etc.

Acknowledgments

The first author would like to thank Universiti Sains Malaysia for the financial support under USM fellowship scheme for his PhD study.

References

1. Burke, E.K., Jackson, K., Kingston, J.H., Weare, R.: Automated university time-tabling: The state of the art. The Computer Journal 40, 565–571 (1997)

2. Schaerf, A.: A Survey of Automated Timetabling. Artif. Intelli. Rev. 13, 87–127 (1999)

Page 164: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

160 M.A. Al-Betar, A.T. Khader, and I.Y. Liao

3. Wood, D.: A technique for colouring a graph applicable to large scale timetabling problems. The Computer Journal 12, 317–319 (1969)

4. Asmuni, H., Burke, E.K., Garibaldi, J.: Fuzzy Multiple Heuristic Ordering for Course Timetabling. In: al-SMAe (ed.) Proceedings of the 5th United Kingdom Workshop on Computational Intelligence (UKCI 2005), London, UK, pp. 302–309 (2005)

5. Abdullah, S., Burke, E.K., McCollum, B.: A Hybrid Evolutionary Approach to the University Course Timetabling Problem. In: Proceedings of the IEEE Congress on Evolutionary Computation, Singapore, September 2007, pp. 1764–1768 (2007)

6. Burke, E.K., Kendall, G., Soubeiga, E.: A Tabu-Search Hyperheuristic for Timetabling and Rostering. Journal of Heuristics 9, 451–470 (2003)

7. Burke, E.K., McCollum, B., Meisels, A., Petrovic, S., Qu, R.: A graph-based hyper-heuristic for educational timetabling problems. Eur. J. Opl. Res. 176, 177–192 (2007)

8. Lewis, R., Paechter, B., Rossi-Doria, O.: Metaheuristics for University Course Time-tabling, Ph.D. Thesis (August 2006)

9. Lewis, R.: A survey of metaheuristic-based techniques for University Timetabling problems. OR Spectrum 30, 167–190 (2008)

10. Blum, C., Roli, A.: Metaheuristics in combinatorial optimization: Overview and con-ceptual comparison. ACM Comput. Surv. 35, 268–308 (2003)

11. Lewis, R., Paechter, B.: New crossover operators for timetabling with evolutionary al-gorithms. In: Lofti, A. (ed.) The fifth international conference on recent advances in soft computing (RASC 2004), Nottingham, England, pp. 189–194 (2004)

12. Socha, K., Joshua, K., Michael, S.: A MAX-MIN Ant System for the University Course Timetabling Problem. In: Dorigo, M., Di Caro, G.A., Sampels, M. (eds.) Ant Algorithms 2002. LNCS, vol. 2463, pp. 1–13. Springer, Heidelberg (2002)

13. Malim, M.R., Khader, A.T., Mustafa, A.: Artificial Immune Algorithms for University Timetabling. In: Burke, E.K., Rudova, H. (eds.) The 6th International Conference on Practice and Theory of Automated Timetabling, Brno, Czech Republic, pp. 234–245 (2006)

14. Al-Betar, M.A., Khader, A.T., Gani, T.A.: A harmony search algorithm for university course timetabling. In: 7th International Conference on the Practice and Theory of Automated Timetabling (PATAT 2008), Montreal, Canada, August 18-22 (2008)

15. Thompson, J., Dowsland, K.: Variants of simulated annealing for the examination timetabling problem. Annals of Operations Research 63, 105–128 (1996)

16. Chiarandini, M., Birattari, M., Socha, K., Rossi-Doria, O.: An effective hybrid algo-rithm for university course timetabling. J. of Scheduling 9, 403–432 (2006)

17. Rossi-Doria, O., Blum, C., Knowles, J., Sampels, M., Socha, K., Paechter, B.: A local search for the timetabling problem. In: Proceedings of the 4th International Conference on the Practice And Theory of Automated Timetabling (PATAT 2002), August 2002, pp. 124–127 (2002)

18. Abdullah, S., Burke, E., McCollum, B.: Using a Randomised Iterative Improvement Algorithm with Composite Neighbourhood Structures for the University Course Time-tabling Problem. Metaheuristics, 153–169 (2007)

19. Abdullah, S., Burke, E.K., McCollum, B.: An Investigation of Variable Neighbour-hood Search for University Course Timetabling. In: Proceedings of the 2nd Multidis-ciplinary Conference on Scheduling: Theory and Applications (MISTA), New York, USA, pp. 413–427 (2005)

20. Landa-Silva, D., Obit, J.H.: Great deluge with non-linear decay rate for solving course timetabling problems Intelligent Systems. In: Proceedings of the 4th International IEEE Conference on Intelligent Systems, pp. 8-11-18-18 (2008)

Page 165: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

A Harmony Search with Multi-pitch Adjusting Rate 161

21. McMullan, P.: An extended implementation of the great deluge algorithm for course timetabling. In: Shi, Y., van Albada, G.D., Dongarra, J., Sloot, P.M.A. (eds.) ICCS 2007. LNCS, vol. 4487, pp. 538–545. Springer, Heidelberg (2007)

22. Qu, R., Burke, E.K., McCullom, B., Merlot, L.T.G., Lee, S.Y.: A survey of search methodologies and automated approaches for examination timetabling. Journal of Scheduling 12, 55–89 (2009)

23. Abdullah, S., Turabieh, H.: Generating university course timetable using genetic algo-rithms and local search. In: The Third 2008 International Conference on Convergence and Hybrid Information Technology (ICCIT), pp. 254–260 (2008)

24. Al-Betar, M.A., Khader, A.: A hybrid harmony search for university course time-tabling. In: Proceedings of the 4nd Multidisciplinary Conference on Scheduling: The-ory and Applications (MISTA 2009), Dublin, Ireland, August 10-12, pp. 157–179 (2009)

25. Landa-Silva, D., Obit, J.: Evolutionary Non-linear Great Deluge for University Course Timetabling. In: Corchado, E., et al. (eds.) HAIS 2009. LNCS (LNAI), vol. 5572, pp. 269–276. Springer, Heidelberg (2009)

26. Carter, M.W., Laporte, G.: Recent developments in practical course timetabling. In: Burke, E.K., Carter, M. (eds.) PATAT 1997. LNCS, vol. 1408, pp. 3–19. Springer, Heidelberg (1998)

27. Al-Betar, M.A., Khader, A.: A Harmony Search Algorithm for University Course Timetabling. Annals of Operations Research (to appear)

28. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A new heuristic optimization algorithm: harmony search. Simulation 76, 60–68 (2001)

29. Eberhart, R., Kennedy, J.: A new optimizer using particle swarm theory. In: Proceed-ings of 6th International Symposium on Micro Machine and Human Science (MHS 1995), pp. 39–43 (1995)

30. Lee, K.S., Geem, Z.W.: A new structural optimization method based on the harmony search algorithm. Computers & Structures 82, 781–798 (2004)

31. Obit, J.H., Landa-Silva, D., Ouelhadj, D., Sevaux, M.: Non-Linear Great Deluge with Learning Mechanism for Solving the Course Timetabling Problem. In: The 8th Meta-heuristics International Conference (MIC 2009), Hamburg, Germany (July 2009)

32. Turabieh, H., Abdullah, S., McCollum, B.: Electromagnetism-like Mechanism with Force Decay Rate Great Deluge for the Course Timetabling Problem. In: RSKT 2009. LNCS, vol. 5589, pp. 497–504. Springer, Heidelberg (2009)

Page 166: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Z.W. Geem: Recent Advances in Harmony Search Algorithm, SCI 270, pp. 163–174. springerlink.com © Springer-Verlag Berlin Heidelberg 2010

An Optimization Algorithm Based on Harmony Search for RNA Secondary Structure Prediction

Abdulqader M. Mohsen, Ahamad Tajudin Khader, and Dhanesh Ramachandram1

Abstract. The determination of RNA molecules function relies heavily on its sec-ondary structure. The current physical methods for RNA structure determination are time consuming and expensive. Hence, the methods of computational predic-tion of structure are the better alternatives. Various algorithms have been used for the RNA structure prediction, including dynamic programming and meta-heuristic algorithms. This chapter proposes the meta-heuristic harmony search algorithm (HSRNAFold) to find RNA secondary structure with minimum free energy and similarity to the native structure. HSRNAFold is compared to dynamic program-ming techniques: RNAFold and the benchmark, Mfold. The results show that HSRNAFold is comparable to dynamic programming in finding the minimum free energies in all RNA test sequences. The proposed method is efficient and promis-ing in predicting the RNA secondary structure based on the minimum free energy.

1 Background

The number of the biological functions of RNA has increased in the recent years. In addition, the scope has been expanded, thus RNA is not only a passive messen-ger of genetic information from DNA to proteins manufactures as it was thought before. It turns out that RNA performs a variety of tasks in many different bio-logical contexts. For example, catalyzing chemical reactions or complementing protein enzyme based-activity[1, 2]. Determining the secondary structure of an RNA molecule is very important in understanding its biological function [3, 4].

An RNA molecule is a sequence of four different types of nucleotides. Each nucleotide has one of these bases: adenine (A), guanine (G), cytosine (C) or uracil (U). This sequence is the primary structure of the RNA molecule. The hydrogen bonds among nucleotides that are not neighbors in the chain constitute a secondary structure. These hydrogen bond occur mostly between G and C, A and U, or G and U (or vice versa). The connected nucleotide bases are called canonical base pairs. RNA secondary structure has a number of elements, as illustrated in Figure 1. These elements include common motifs such as helices (stems), hairpin loops, in-ternal loops, bulges, multi-branched loops and external bases. The stacked base

Abdulqader M. Mohsen, Ahamad Tajudin Khader, and Dhanesh Ramachandram School of Computer Science, University of Science Malaysia, Penang, 11800, Malaysia E-mail: [email protected], {tajudin,dhaneshr}@cs.usm.my

Page 167: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

164 A.M. Mohsen, A.T. Khader, and D. Ramachandram

pairs form the helices. The stability of the secondary structure increases according to the number of stacked base pairs, which are the stems. On the contrary, the number of unpaired bases decreases the stability of the structure such as interior loops, hairpin loop or bulges.

Fig. 1 RNA secondary structure components: stems (helices), interior loops, hairpin loop, multi loops and bulges loops. This figure is created using jViz.RNA [5] for the Deinococcus radi-odurans organism.

The RNA secondary structure prediction is not a trivial problem. It is much more difficult to predict the specific base pairings that results in the native RNA structure. It has been estimated that the number of secondary structures modeled

from the input of n nucleotides is greater than n8.1 [6]. For example, Saccharo-myces cerevisiae (X67579) 5S rRNA with 118 nucleotides in length has an esti-

mated of 30103.1 × secondary structure models, while a larger RNA such as the Sulfolobus acidocaldarius (D14876) 16S rRNA , with 1493 nucleotides, has an es-

timated total of 381103.1 × possible secondary structure models. Since RNA folding is subject to the laws of thermodynamics, there is an as-

sumption that the correct structure is the low energy structure [3, 7]. The stability of the secondary structure depends on the amount of free energy released to form

Page 168: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Optimization Algorithm Based on Harmony Search 165

the base pairs. Consequently, more negative free energy in a structure yields to more stable formation of a particular sequence.

One of the main approaches to study the RNA’s secondary structures is the sin-gle sequence approach. The general objective of this approach is to compute the secondary structure by minimizing the total free energy of its substructures such as stems, loops and bulges.

Most of the methods that have been developed are based on the free energy minimization by either applying dynamic programming or meta-heuristics to the domain.

In this chapter, Section 2 will present a short overview of the RNA secondary structure algorithms. Harmony search will be presented in Section 3 and HSRNA-Fold will be introduced in Section 4. The experimental results will be discussed in Section 5. Finally, conclusions and future works will be elaborated in Section 6.

2 RNA Secondary Structure Prediction Algorithms

Dynamic programming algorithms, based on the free energy minimization of a single RNA sequence has been studied since the early 1970s [8]. Mathews [9] provided a review of the revolutions that have occurred in the development of a number of algorithms.

Zuker et al. [10-12] proposed the dynamic programming algorithm Mfold. It is still a popular algorithm for finding the minimum free energy (MFE) pseudoknot-free secondary structure of an RNA molecule. Moreover, it has become the benchmark for computational RNA secondary structure prediction. Mfold takes the primary RNA sequence as input, and uses a complex thermodynamic model for free energy evaluation of structures by seeking the pseudoknot-free secondary structure with the MFE.

RNAFold from ViennaRNA Package predicts the RNA secondary structure through energy minimization. It reads an RNA sequence as input and provides three kinds of dynamic programming algorithms for the structure prediction, as follows: i) the minimum free energy algorithm to find a single optimal structure, ii) the partition function algorithm to calculate the base pair probabilities in the thermodynamic ensemble, and iii) the suboptimal folding algorithm to generate all suboptimal structures based on the minimum free energy [13].

On the other hand, many meta-heuristics algorithms were proposed such as Genetic Algorithms (GAs), Simulated Annealing (SA) and Particle Swarm Algo-rithm (PSA). The more recent GAs’ works in this area are RnaPredict and its par-allelized version, P-RnaPredict which was proposed by Wiese and his students. They showed that the quality of their algorithm is comparable to Mfold [14, 15]. SARNA-Predict is an SA algorithm that was introduced in [3, 16] which was used to predict an RNA secondary structure that has a low free energy and high number of correctly predicted base pairs when compared to the known native structures. Recently, HelixPSO which is a PSA was proposed by Geis and Middendorf [17]. It was used for finding secondary structures with low free energy.

Page 169: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

166 A.M. Mohsen, A.T. Khader, and D. Ramachandram Harmony Search (HS) algorithm is an optimization technique that was devel-

oped by Geem[18]. HS mimics the improvisation process of musicians. The HS algorithm has been proven to be successful in a wide variety of optimization prob-lems in the several optimization fields such as continuous engineering optimiza-tion, vehicle routing, combined heat and power economic dispatch, water pump switching problem, optimal scheduling of multiple dam system and transport en-ergy modelling[19].

This chapter proposes a version of a HS algorithm dubbed HSRNAFold for finding the RNA secondary structure with minimum free energy. The behavior of HSRNAFold is compared to both, dynamic programming Mfold and RNAFold on the standard sets of RNA test molecules.

3 Harmony Search Algorithm

Harmony search algorithm [18] refers to the methods that are inspired by a musi-cal performance process which is simulated on a computing platform.

Geem et al. in [18] [20] mentioned four advantages of HS compared to other optimization techniques. These advantages are: i) HS requires less mathematics; ii) initial values for the decision variables are not needed; iii) derivative informa-tion is also unnecessary and v) HS is more flexible and produces better solutions than GA.

Similarities between the music improvisation and the optimization algorithms are summarized as follows:

• Music improvisation seeks the best state (fantastic harmony) determined by the aesthetic estimation, as the optimization algorithms seek the best state (global optimum) by objective function evaluation.

• Aesthetic estimation is determined by the set of pitches played by joined in-struments, just as objective function (function evaluation) is determined by the set of values of decision variables.

• Aesthetic sound quality (better aesthetic) can be improved practice after prac-tice; just as function value can be improved iteration after iteration.

In general, HS has five steps as shown in Figure 2 and as follows:

1. Initializing the problem and algorithm parameters including a representation of solution vectors to the problem.

2. Creating an initial harmony memory (HM) of candidate solutions as a solution vector.

3. Improvising a new harmony from HM. 4. Updating the harmony memory. 5. And, finally, checking the stopping criterion.

HS manages the harmony memory vectors of harmonies in which each har-mony represents a potential solution to the given problem. It executes an essen-tially blind search in complex search space. To be successful, HS must strike a balance between exploitation and exploration [21, 22].

Page 170: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Optimization Algorithm Based on Harmony Search 167

Fig. 2 Optimization steps of the harmony search algorithm

HS has four main parameters that direct the search toward the most favorable areas of the search space. These parameters are:

• Harmony memory size (HMS) represents the total number of harmonies in the HM. • Harmony memory consideration rate (HMCR) represents the probability of

picking up values from HM to the variables in the solution vector. • Random selection rate (RSR) represents the probability of randomly choosing

feasible values from the rage of all possible values to the variables in the solu-tion vector.

• Pitch adjusting rate (PAR) represents the probability of further adjusting the pitch with neighboring pitches.

In each cycle or ‘improvisation’, each harmony is evaluated to determine its relative fitness within the harmony memory vectors; a new harmony is retained via each improvisation process. HMCR and PAR are applied to the HM in each improvisation process.

After the improvisation of the new harmony is completed, it is evaluated by its objective function (fitness function). If the value of its objective function is better than the value of the objective function of the worst harmony in the HM, the new harmony is included in the HM and the existing worst harmony is excluded from the HM. Consequently, the vectors are sorted out based on their fitness functions.

Then, the cycle repeats itself with a new harmony. After a varying number of improvisations, the algorithm converges to the best harmony, which represents a quasi-optimal or optimal solution to the given problem.

Page 171: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

168 A.M. Mohsen, A.T. Khader, and D. Ramachandram

4 HSRNAFold

The proposed algorithm (HSRNAFold) builds a set of feasible helices H , and then it tries to find a subset of H that defines an optimal secondary structure with the minimum free energy. Consequently, the structure prediction becomes a combina-torial optimization problem of picking a subset, x from H . Since RNA folds into a structure with near minimal free energy, HSRNAFold attempts to find the com-bination of helices that produces a feasible structure with the lowest possible free energy.

The first step of HSRNAFold algorithm is to build a base pairs pool of all pos-sible canonical base pairs for a given RNA sequence. Then, from this pool, the algorithm builds the set H of all the potential helices of an RNA molecule. The algorithm iterates through each base pair in the pool and attempts to build a helix by stacking additional base pairs on top of the existing ones. Each base pair is checked if it can be extended to the candidate helix or not by applying the secon-dary structure constraints. If the candidate helix satisfies the constraints, then that helix must be added to H . A valid helix is specified by three constraints:1) each helix must have at least three stacked canonical base pairs; 2) pairing bases must be at least three bases apart )3( >− ij ; 3) each helix must not share its base with

others, i.e.: { } { } φ='' ,, jiji ∩ . Once a new helix is created, HSRNAFold com-

putes its free energy contribution. The helix size and the type of base pairs con-tribute to decrease the free energy of an RNA secondary structure[23].

Then, HSRNAFold fills HM by randomly generating feasible solutions of RNA secondary structures. These solutions are randomly created by subsets of helices from H with the size of M)*(N where N is the length of RNA nucleotide and M

is the HMS. All generated structures are evaluated using RNAeval algorithm from the ViennaRNA and then these structures are sorted in the HM. In this case, each harmony in the HS encodes a potential RNA feasible structure. A permutation-based representation is used to encode the RNA secondary structure. Each helix in H is numbered by an integer ranging from 0 to 1−n ; where n is the number of helices in H . For example, if n = 4, {2, 3, 1, 0} and {1, 0, 3, 2} will be two possi-ble permutations. To produce feasible structures, each permutation is decoded from left to right. Each helix is checked for conflicts with helices to its left. If there are no conflicts found, the helix is retained; otherwise it is discarded.

After that, the algorithm generates a new structure based on the memory con-sideration rate, pitch adjustment and random selection.

Then, the new structure is evaluated by calculating its free energy; if it is better than the worst structure in the HM, then it will be included in the HM and the ex-isting worst structure will be excluded.

Finally, the algorithm iterates through the solution vectors and generates a new structure in each iteration until the structure of the minimum free energy is found or the maximum number of iterations is reached. Figure 3 shows the pseudo code of the proposed HSRNAFold algorithm. For more details see [24].

Page 172: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Optimization Algorithm Based on Harmony Search 169

Fig. 3 Pseudo code of the HSRNAFold algorithm

5 Results

The proposed algorithm is implemented using C#. To conduct the experiments, six different RNA sequence lengths were used. These sequences are derived from the comparative RNA website [25] which represents a good variety of sequence lengths, organisms, and RNA types.

The test RNA sequences including their organism, class, accession number, size and the number of helices are recorded in Table 1.

Table 1 Test RNA sequences with their organism, class, accession number, length and the number of helices

Organism Name Seq. Length No. of Helices

Saccharomyces cerevisiae 5S rRNA (X67579) 118 48

Haloarcula marismortui 5S rRNA (AF034620) 122 102

Aureoumbra lagunensis Group I intron, 16S rRNA (U40258) 468 371

Drosophila virilis 16S rRNA (X05914) 784 280

Xenopus laevis 16S rRNA (M27605) 945 748

Sulfolobus acidocaldarius 16S rRNA (D14876) 1493 6183

Page 173: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

170 A.M. Mohsen, A.T. Khader, and D. Ramachandram Each chosen sequence has a known structure specified by the comparative

methods. Table 2 demonstrates the best setting for these HSRNAFold parameters: HMS, HMCR, PAR and the number of iterations. The number of iterations is var-ies between 30 and 30000 iterations. The number of helices and the length of the sequences contribute directly to increase the number of iterations.

Table 2 HSRNAFold parameters setting

Parameter name Parameter setting

HMS 90

HMCR 0.95

PAR 0.3

No. of iterations 30-30000

The proposed algorithm is compared to the web servers of the dynamic pro-

gramming algorithms: Mfold and RNAFold. The comparison was conducted based on the structure with the minimum free energy as the structure with more negative free energy is more stable.

Table 3 illustrates the minimum free energies found in both dynamic program-ming algorithms and HSRNAFold.

Table 3 Minimum free energies ( G∆ in kcal/mol) for Mfold, RNAFold and HSRNAFold

RNA length Mfold RNAFold HSRNAFold

118 -53.50 -55.30 -54.50

122 -56.44 -60.72 -58.52

468 -140.50 -147.10 -133.75

784 -146.30 -150.66 -151.26

945 -250.60 -261.66 -259.96

1493 -803.30 -847.20 -662.30

Figure 4 demonstrates that HSRNAFold algorithm achieved comparable results

to the dynamic programming algorithms in all six test’s RNAs. Figure 5 shows that the secondary structure predicated by HSRNAFold is com-

pared to the known secondary structure for the Saccharomyces cerevisiae 5S rRNA (X67579). The dark grey lines represent the base pairs for both the known and predicted structure (true positive base pairs). The light grey lines represent the predicated base pairs which are not found in the known structure (false positive base pairs). The black lines indicate base pairs in the known structures which have not been predicted (false negative base pairs).

Page 174: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Optimization Algorithm Based on Harmony Search 171

118 122 468 784 945 1493-900

-800

-700

-600

-500

-400

-300

-200

-100

0

MF

E

RNA Sequences

Mfold

RNAFold

HSRNAFold

Fig. 4 The comparison between minimum free energies of Mfold, RNAFold and HSRNAFold

Fig. 5 The comparison between the known and predicted secondary structures for the Sac-charomyces cerevisiae RNA sequence base pairs. This figure was created by [5].

For the true positive base pairs, it should be noted that HSRNAFold and Mfold have found 33 out of 37, that is, 89.2% of the known base pairs in the native struc-ture. In contrary, the RNAFold has found only 28 out of 37, namely 75.7%. In terms of false positive base pairs, HSRNAFold has found fewer base pairs (6 base pairs) which are not found in the known structure compared to both Mfold and RNAFold (8, 14 base pairs respectively). In case of false negative base pairs, HSRNAFold and Mfold are tied. They have failed to predict only 4 base pairs whereas RNAFold has failed to predict 9 base pairs. For more details see [26].

Page 175: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

172 A.M. Mohsen, A.T. Khader, and D. Ramachandram Consequently, this implies that the minimum free energy does not necessarily

guarantee predicting the native structure. It is interesting to note that the HSRNAFold algorithm performance is influ-

enced by the length of RNA sequence and the number of helices. Accordingly, the finding of the structure with minimum free energy requires a few iterations with short sequences and a few numbers of helices. Thus, the number of iterations in-creases whenever the length of sequence and the number of helices increase. For example, the number of iterations required to find the minimum free energies of Saccharomyces cerevisiae 5S rRNA (X67579) and Sulfolobus acidocaldarius 16S rRNA (D14876) are 30 and 30000 iterations respectively.

6 Conclusions

In this chapter, a harmony search algorithm (HS) called the HSRNAFold is pre-sented for finding the RNA secondary structure with minimum free energy. Com-paring to dynamic programming algorithms, HSRNAFold is comparable to RNA-Fold and Mfold in predicting the RNA secondary structure with minimum free energy. On the other hand, HSRNAFold takes longer time to reach the optimum solution for large sequences compared to the small sequences.

Future work will include the refinement of helix generation algorithm and the study of the effect of the HS parameters to enhance the results.

Acknowledgements

The first author would like to acknowledge University of Science Malaysia for the financial support under USM Fellowship scheme. Also he would like to acknowl-edge the Ministry of Science, Technology and Innovation, MOSTI for funding this research under the EscienceFund grant, for “An Intelligent Genetic Algorithms’ Parameters Adaptation for RNA Folding Problem” Project [USM0001306].

References

1. Doudna, J.A., Cech, T.R.: The chemical repertoire of natural ribozymes. Nature 418, 222–228 (2002)

2. Hansen, J.L., Schmeing, T.M., Moore, P.B., et al.: Structural insights into peptide bond formation. Proceedings of the National Academy of Sciences, 11670–11675 (2002)

3. Tsang, H.H., Wiese, K.C.: SARNA-Predict: A study of RNA secondary structure pre-diction using different annealing schedules. In: Proceedings of the IEEE Symposium on Computational Intelligence in Bioinformatics and Computational Biology, pp. 239–246 (2007)

4. Neethling, M., Engelbrecht, A.P.: Determining RNA Secondary Structure using Set-based Particle Swarm Optimization. In: IEEE Congress on Evolutionary Computation (CEC 2006), pp. 1670–1677 (2006)

Page 176: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

An Optimization Algorithm Based on Harmony Search 173

5. Wiese, K.C., Glen, E., Vasudevan, A.: jViz.RNA - A Java Tool for RNA Secondary Structure Visualization. IEEE Transactions on NanoBioscience 4, 212–218 (2005)

6. Doshi, K.J., Cannone, J.J., Cobaugh, C.W., et al.: Evaluation of the suitability of free-energy minimization using nearest-neighbor energy parameters for RNA secondary structure prediction. BMC Bioinformatics 5, 1471–2105 (2004)

7. Deschênes, A.A.: A genetic algorithm for RNA secondary structure prediction using stacking energy thermodyamic models. Master’s thesis, Simon Fraser University (2005)

8. Tinoco, I., Uhlenbeck, O.C., Levine, M.D.: Estimation of secondary structure in ribo-nucleic acids. Nature 230, 362–367 (1971)

9. Mathews, D.H.: Revolutions in RNA secondary structure prediction. Journal of Mo-lecular Biology 359, 526–532 (2006)

10. Zuker, M., Stiegler, P.: Optimal computer folding of large RNA sequences using ther-modynamics and auxiliary information. Nucl. Acids. Res. 9, 133–148 (1981)

11. Zuker, M.: Prediction of RNA Secondary Structure by Energy Minimization. In: An-nette, M.G., Hugh, G.G. (eds.) Computer Analysis of Sequence Data, pp. 267–294. Humana Press (1994)

12. Zuker, M.: Mfold web server for nucleic acid folding and hybridization prediction. Nucleic Acids Research 31, 3406–3415 (2003)

13. Hofacker, I.L., Fontana, W., Stadler, P.F., et al.: Fast folding and comparison of RNA secondary structures (The Vienna RNA Package). Monatshefte f. Chemie 125, 167–188 (1994)

14. Wiese, K.C., Hendriks, A.: Comparison of P-RnaPredict and mfold algorithms for RNA secondary structure prediction. Bioinformatics 22, 934–942 (2006)

15. Wiese, K.C., Deschnes, A., Hendriks, A.: Rnapredict - an evolutionary algorithm for RNA secondary structure prediction. IEEE/ACM Transactions on Computational Biol-ogy and Bioinformatics 5, 25–41 (2007)

16. Tsang, H.H., Wiese, K.C.: The signifcance of thermodynamic models in the accuracy improvement of RNA secondary structure prediction using permutation-based simu-lated annealing. In: Proceedings of the IEEE Congress on Evolutionary Computation, Singapore, pp. 3879–3885 (2007)

17. Geis, M., Middendorf, M.: A Particle Swarm Optimizer for Finding Minimum Free Energy RNA Secondary Structures. In: Proceedings of IEEE Swarm Intelligence Sym-posium, SIS 2007 (2007)

18. Geem, Z.W., Kim, J.H., Loganathan, G.V.: A New Heuristic Optimization Algorithm: Harmony Search. Simulation 76, 60–68 (2001)

19. Mahdavi, M., Fesanghary, M., Damangir, E.: An improved harmony search algorithm for solving optimization problems. Applied Mathematics and Computation 188, 1567–1579 (2007)

20. Lee, K.S., Geem, Z.W.: A new meta-heuristic algorithm for continuous engineering optimization: harmony search theory and practice. Computer Methods in Applied Me-chanics and Engineering 194, 3902–3933 (2005)

21. Yang, X.-S.: Harmony Search as a Metaheuristic Algorithm. In: Geem, Z.W. (ed.) Mu-sic-Inspired Harmony Search Algorithm. Springer, Heidelberg (2009)

22. Omran, M.G.H., Mahdavi, M.: Global-best harmony search. Applied Mathematics and Computation 198, 643–656 (2008)

23. Hendriks, A.: A parallel evolutionary algorithm for RNA secondary structure predic-tion. Master’s thesis, Simon Fraser University (2005)

Page 177: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

174 A.M. Mohsen, A.T. Khader, and D. Ramachandram

24. Mohsen, A.M., Khader, A.T., Ramachandram, D., et al.: Finding the minimum free energy RNA Secondary Structures using Harmony Search Algorithm. In: WCSET 2009, Singapore (2009)

25. Cannone, J.J., Subramanian, S., Schnare, M.N., et al.: The comparative rna web (crw) site: an online database of comparative sequence and structure information for ribo-somal, intron, and other rnas. BMC Bioinformatics 3, 169–172 (2002)

26. Mohsen, A.M., Khader, A.T., Ramachandram, D.: Comparison of HSRNAFold and RNAFold algorithms for RNA secondary structure prediction. In: TENCON 2009, Singapore (accepted, 2009)

Page 178: HSRNAFold: A harmony search algorithm for RNA secondary structure prediction based on minimum free energy

Author Index

Abraham, Ajith 65Al-Betar, Mohammed Azmi 147Artrit, Pramin 23Ayvaz, M. Tamer 111

Bo, Guihua 135

Cisty, Milan 123

Das, Swagatam 65de A. Bernert, Diego L. 77dos Santos Coelho, Leandro 77

Fesanghary, Mohammad 99Forsati, Rana 51Fourie, Jaco 37

Gao, X.Z. 11Geem, Zong Woo 1Green, Richard 37

Huang, Min 135

Ip, W.H. 135

Khader, Ahamad Tajudin 147, 163

Liao, Iman Yi 147

Mahdavi, Mehrdad 51Meesomboon, Anupap 23Mills, Steven 37Mohsen, Abdulqader M. 163

Ozturk, Ferruh 89

Panigrahi, B.K. 65

Ramachandram, Dhanesh 163Ravikumar Pandi, V. 65

Tangpattanakul, Panwadee 23

Wang, Tong 11Wang, Xingwei 135

Xu, He 11Xue, Kai 11

Yildiz, Ali Rıza 89