Research Article

A Hybrid Harmony Search Algorithm with Distribution Estimation for Solving the 0-1 Knapsack Problem

Algorithm 2

Initialization phase.
for i = 1: HMS
   For j = 1: N
    If rand < rand
   
    else
   
    end if
   end for
Calculate the total weight of the harmony
   while  > C % Determine whether the constraint satisfies the condition
   Reinitialize the harmony vector
   End while
End for