Skip to main content
. 2022 Nov 27;22(23):9227. doi: 10.3390/s22239227
Algorithm 1 HNOGA pseudocode
  • 1:

    Input: population size M, number of elite individuals q, subpopulation neighborhood search probability Pm1, optimal individual neighborhood search probability Pm2, and maximum iteration number T;

  • 2:

    Output: the optimal individual Ib;

  • 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 q<M. Studies show that when q=0.3M, the performance of the algorithm is optimal.

  • 5:

    Step 2: Genetic algorithm optimization

  • 6:

    for iteration t=1:T 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 Pm1, 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 Pm2;

  • 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 Ib of the last generation population;

  • 13:

    End: Obtain the optimal individual Ib.