Algorithm 1: Pseudo-code of the Pathfinder algorithm |
1. Initialize the population 2. Calculate the fitness of initial population 3. Find the Pathfinder 4. While K < maximum number of iterations 5. α and β = random number in [1, 2] 6. Update the position of Pathfinder using Equation (1) 7. If new Pathfinder is better than old 8. Update Pathfinder 9. End 10. For i = 2 to maximum number of populations 11. Update positions of members using Equation (2) 12. End 13. Calculate new fitness of members 14. Find the best fitness 15. If best fitness < fitness of Pathfinder 16. Pathfinder = best member 17. Fitness = best fitness 18. End 19. For i = 2 to maximum number of populations 20. If new fitness of member(i) < fitness of member(i) 21. Update members 22. End 23. End 24. Generate new A and ε 25. End |