Research Article
A Hybrid Harmony Search Algorithm with Distribution Estimation for Solving the 0-1 Knapsack Problem
Algorithm 4
A novel form of directed improvisation.
(1) | for j = 1: N | (2) | Calculate the probability of each dimension of the population being selected | (3) | if rand < HMCR% Consideration of harmony memory bank | (4) | Operate on a harmonic vector randomly selected from the harmony memory library | (5) | if rand < PAR% Determine whether to make pitch adjustment | (6) | If rand < probability %The probability generated by the distribution estimation algorithm is used for judgment | (7) | B (j) = 1; | (8) | Else | (9) | B (j) = 0; | (10) | end if | (11) | end if | (12) | else | (13) | | (14) | End if | (15) | End for |
|