## 2 Harmony Search Algorithm  
The harmony search algorithm is a recently proposed metaheuristic search technique that mimics the process of music improvisation [23; 24; 25; 26; 27]. There are different variants of this algorithm that have been created to improve it or solve specific problems [19; 28; 29; 30]. This method is composed of the following steps:  
* Step 1: Initialize the problem and parameters Minimize \[f(x)s.t.x(j)\in[LB(j),\;UB(j),\;j=1,\;2,\ldots,\;n],\] (1)  
where \(f(x)\) is the objective function, \(x(j)\) is the decision variables, \(n\) is the number of design variables, and \(LB(j),\;UB(j)\) are the lower and upper of the design variables, respectively.  
* Step 2: Initialize the harmony memory (HM)  
The harmony memory (HM) is a matrix of harmony solution vectors, where its size depends on the harmony memory size (HMS). The HM is occupied by many randomly generated solution vectors and sorted by the objective function value, where \(X_{i}=\{x_{i}(1),\;x_{i}(2),\ldots,x_{i}(n)\}\) represents the \(i\)th harmony vector, which is randomly generated as follows: \(x_{i}(j)=LB(j)+(UB(j)-LB(j))\times r\) for \(j=1,2,\ldots,n\) and \(i=1,2,\ldots,HMS\), where \(r\) is a uniform random number [0; 1].  
\[HM=\left[\begin{array}{ccccc}x_{1}^{1}&x_{2}^{1}&\ldots&x_{N}^{1}&f\big{(}x ^{1}\big{)}\\ x_{1}^{2}&x_{2}^{2}&\ldots&x_{N}^{2}&f\big{(}x^{2}\big{)}\\ \vdots&\vdots&\vdots&\vdots&\vdots\\ x_{1}^{HMS}&x_{2}^{HMS}&\ldots&x_{N}^{HMS}&f\big{(}x^{HMS}\big{)}\end{array}\right] \tag{2}\]  
* Step 3: Improvise a new harmony  
This step is the most important because it influences the overall performance of the HS algorithm. A new harmony memory vector is improvised using three selected operators, which are the memory considerations (_HMR_), pitch adjustment (PAR), and randomization. The random numbers, \(r_{1}\) and \(r_{2}\) range between 0 and 1. In each improvisation or iteration, if \(r_{1}\) is less than _HMR_ the solution vector and \(x_{new}(j)\) is generated from the memory consideration; otherwise, \(x_{new}(j)\) is selected through randomization. Next, if \(r_{2}\) is less than the PAR, the solution vector \(x_{new}(j)\) from the memory consideration is further modified with the bandwidth distance using Equation (3):  
\[X_{new}(j)=X_{new}(j)\pm r\,\times BW, \tag{3}\]where \(r\) is a uniform random number ranging from 0 and 1. The function of BW is an arbitrary distance bandwidth. The value of BW is determined by the changes in quantity of the new solution vector and its presence is enhanced by the performance of HS.  
* Step 4: Update harmony memory  
To update the HM with a new solution vector, \(x_{new}\), an objective function will be used to evaluate it. A comparison is made to see if the new vector solution is better than the worst historical vector solution and the worst historical solution is excluded and replaced with a new one.
* Step 5: Check the stopping criteria  
The process is repeated until the number of improvisations (NI) is satisfied; otherwise the process repeats steps 3 and 4. The _HMR_ parameter represents the intensification or exploitation; the PAR and randomization parameters represent the diversification or exploration in the algorithm.