|
Algorithm 1 HNOGA pseudocode |
-
1:
Input: population size M, number of elite individuals q, subpopulation neighborhood search probability , optimal individual neighborhood search probability , and maximum iteration number T;
-
2:
Output: the optimal individual ;
-
3:
Start:
-
4:
Step 1: The initial population with population size M was generated by random coding, the fitness of each individual in the initial population was calculated, and the top q individuals with the highest fitness were copied and saved . Studies show that when , the performance of the algorithm is optimal.
-
5:
Step 2: Genetic algorithm optimization
-
6:
for iteration
do
-
7:
Main genetic algorithm operation: random league selection, orthogonal uniform crossover, uniform mutation;
-
8:
All the individuals whose fitness is not 0 in the population and whose subpopulation contains greater than or equal to 2 individuals are optimized by the micro genetic algorithm with probability , and then the niche operation is performed;
-
9:
The individual with the highest fitness in the whole population was selected to perform micro genetic algorithm optimization with probability ;
-
10:
Perform niche operations;
-
11:
The top q individuals with the highest fitness in the population are copied and retained, and the top M individuals with the highest fitness are used to form the population of the next iteration.
-
12:
Step 3: Output the optimal individual of the last generation population;
-
13:
End: Obtain the optimal individual .
|