|
Algorithm 1: Programming steps of the genetic algorithm.
|
| 1. Begin
|
| 2. Parameter setting |
| 3. t = 0 |
| 4. Initialize It = [,,…] |
| 5. While stop criteria unsatisfied do
|
| 6. for i = 1 to d do
|
| 7. Evaluate fitness of It
|
| 8. end for
|
| 9. for i = 1 to d do
|
| 10. Select operation to It
|
| 11. end for
|
| 12. for i = 1 to d/2 do
|
| 13. Crossover operation to It
|
| 14. end for
|
| 15. for i = 1 to d do
|
| 16. Mutation operation to It
|
| 17. end for
|
| 18. New population It+1
|
| 19. t = t + 1; d = length(It+1) |
| 20. end While
|
| 21. Output: Best solution
found
|