Research Article
A Novel Self-Adaptive Harmony Search Algorithm
Algorithm 1
Pseudo code of the NSHS algorithm.
NSHS Algorithm | Initialise the problem and algorithm parameters: | Define a standard fitness function by (1) | Define the parameters HMCR by (10), Bw by (11), HMS and NI | Generate randomly an initial HM and calculate fstd | Search the best solution: | While () do | Generate a new harmony vector by the following loop | While () do | First, generate a new value for every variable by the following rules: | If (), then choose uniformly a value from the current memory for variable | | Else, generate randomly | If , then generate randomly in the range of | | Else, generate randomly in the range of | | End if | End if | Second, adjust the new value of every variable by the following rules: | If , then | | Else, generate randomly in the range of | | End if | End while | Assess the merit of the new harmony vector and update the current harmony memory | If , then | Accept the new harmony vector and replace the worst vector in the HM with it. | Recalculate the standard deviation of the fitness function values fstd. | End if | End while | Determine the optimal solution in the HM by the minimum fitness. |
|