Table 3. Genetic Algorithm.
Algorithm 3 Genetic Algorithm |
---|
1: Chromosome encoding. |
2: Initialize the maximum iterations T and generate an initial population G (0) randomly. |
3: Compute the fitness value φ(C) of each sample in initial population G (0). |
4: If Δφ(C) < μ or iterations > T |
5: Return to step 10. |
6: Else perform genetic operators: selection, crossover and mutation. |
7: Generate the next generation of population G (t+1). |
8: Compute the fitness value φ(C) of each sample in initial population G (t+1). |
9: Return to step 4. |
10: Output the optimal solution Copt. |