Research Article
A Novel Harmony Search Algorithm Based on Teaching-Learning Strategies for 0-1 Knapsack Problems
Algorithm 7
Improvisation of new harmony in HSTL algorithm.
; % select as Optimization target vector | For i = 1 to D | If rand() ⩽ HMCR % (a) Harmony memory consideration | | Elseif rand() ⩽ TLP % (b) Teaching-Learning strategy | If rand() ⩽ 0.5 % Teaching | | Else % Learning | Randomly select r 1 and r 2 from | If is better than | | Else | | end | Endif | | Elseif rand(0,1) ⩽ PAR %(c) Local pitch adjusting strategy | | | Endif | If rand(0,1) ⩽ %(d) Random mutation operator in feasible space | | Endif | Endfor |
|