Power Magnetic Devices. Scott D. Sudhoff

Чтение книги онлайн.

Читать онлайн книгу Power Magnetic Devices - Scott D. Sudhoff страница 21

Power Magnetic Devices - Scott D. Sudhoff

Скачать книгу

Schematic illustration of canonical genetic algorithm.

      The next step in the process is selection. In this step, members of the population P[k] are placed into the mating pool M[k]. Two algorithms to do this are roulette wheel selection and tournament selection. In both methods, the mating pool is initially empty and is filled one member at a time by repeatedly applying the selection mechanism. In roulette wheel selection, members of the population are drawn into the mating pool with a probability proportional to their fitness. In particular, the probability of individual i being drawn into the mating pool on a given draw is given by

      (1.5-6)equation

      When applying this particular algorithm, it is important that the fitness function be constructed so that fi ≥ 0. If this is not the case, it is possible to scale/adjust the fitness so that the condition is satisfied (for example, by adding a constant). Note that once a population member has been copied to the mating pool, it is not removed from the population. Thus, it can be copied to the mating pool multiple times.

      In n‐way tournament selection, n members of the population are selected at random, and the member of this subset with the highest function is put into the mating pool. Here again, the member placed into the mating pool is not removed from the population. In tournament selection, there is no restriction on the range of the fitness function, which provides a slight simplification.

for i =1 to Np/2 compute element indices i1 = 2i − 1 i2 = 2i get genetic codes of parents θp1 = i1th individual in M[k] θp2 = i2th individual in M[k] apply genetic operators apply crossover to {θp1,θp2} yielding {θa1,θa2} segregate chromosomes of {θa1,θa2}yielding{θb1,θb2} apply mutation to {θb1,θb2} yielding {θc1,θc2} place children into next population θc1 becomes the i1th individual of P[k + 1] θc1 becomes the i2th individual of P[k + 1] end

Скачать книгу