| (1) Encode the parameters and solution for the partitioning problem; |
| (2) Initialize the first generation , temperature , annealing ratio ; |
| (3) Calculate the fitness of each individual in ; |
| (4) Copy the individual with the highest fitness to the solution; |
| (5) while (termination conditions) do |
| (6) while (number of individuals number of the generation size) do |
| (7) Select two individuals from the current generation; |
| (8) Perform crossover on to produce two new individuals ; /* start of annealing-crossover*/ |
| (9) if (max{fitness(), fitness()} max{fitness(), fitness()}) then |
| (10) = max{fitness, fitness − max{fitness(), fitness()}; |
| (11) if (min{1, exp( random) then |
| (12) Accept the crossover; |
| (13) else |
| (14) Reject the crossover with ; |
| (15) end if |
| (16) else |
| (17) Accept the crossover; |
| (18) end if /* end of annealing-crossover */ |
| (19) Perform mutation on to produce ; /* start of annealing-mutation*/ |
| (20) if (fitness() fitness()) then |
| (21) Δ = (fitness() − fitness()); |
| (22) if (min{1, exp(− random) then |
| (23) Accept the mutation; |
| (24) else |
| (25) Reject the mutation, ; |
| (26) end if |
| (27) else |
| (28) Accept the mutation; |
| (29) end if /* end of annealing-mutation*/ |
| (30) Perform step (19)–(29) on to produce ; |
| (31) end while |
| (32) Calculate the fitness of each individual in current generation; |
| (33) if (the highest fitness of the current generation fitness(solution)) then |
| (34) Copy the individual with the highest fitness to the solution; |
| (35) end if |
| (36) Reduce the temperature and increase the generation number; |
| (37) end while |
| (38) return solution: , ; |