P. 1
Genetic Algorithm

Genetic Algorithm

|Views: 6|Likes:

More info:

Published by: Kuttalingam Dakshinamoorthy on Jun 11, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

12/27/2015

pdf

text

original

GENETIC ALGORITHM

•The genetic algorithm (GA) is an optimization and search technique based on the principles of genetics and natural selection. •A GA allows a population composed of many individuals to evolve under specified selection rules to a state that maximizes the “fitness”
GENETIC OPERATORS 1. Selection 2. Crossover 3. Mutation SELECTION • Two chromosomes are selected from the mating pool of Nkeep chromosomes to produce two new offspring. Pairing takes place in the mating population until Npop - Nkeep offspring are born to replace the discarded chromosomes. 1. Pairing from top to bottom. 2. Random pairing. 3. Weighted random pairing. a. Rank weighting. b. Cost weighting. 4. Tournament selection.

The genetic makeup of the population is limited by the current members of the population.CROSSOVER (MATING) • Mating is the creation of one or more offspring from the parents selected in the pairing process. The most common form of mating involves two parents that produce two offspring • Partially mapped crossover •Order crossover •Cyclic crossover •Position based crossover •Order based crossover •Cycle crossover •Linear order crossover •Subsequence exchange crossover •Job based order crossover •Partial schedule exchange crossover •Substring exchange crossover •Heuristic based crossover .

OPERATORS USED • Probability based selection • Order crossover • Mutation combined with local search . Mutation is the second way a GA explores a cost surface. The machines are needed to be arranged in a particular sequence so as to minimize the total cost. PROBLEM The organization has shifted to a new assembly line to assemble a paticular class of valve. It can introduce traits not in the original population and keeps the GA from converging too fast before sampling the entire cost surface.MUTATION • Random mutations alter a certain percentage of the bits in the list of chromosomes. WHY GA? • These type of sequencing problems are too complex and has several combinatorial constrains to be solved by any conventional optimization methods • The above mentioned problem belongs to the class of NP-hard. Hence use of GA suits well. As the n number of machines leads to various combinations this problem needs to be optimized to obtain the solution.

If the crossover points are after the second and fourth integers. however. All integers that were in those positions are pushed off the left of the chromosome and wrap around to the end of the offspring. by choosing two crossover points and exchanging the integers between them. the first stage leaves offspring that look like • At this point the holes are pushed to the beginning of the offspring. like PMX. This time. holes are left (denoted below by X’s) in the spaces where integers are repeated.SELECTION • In this problem the selection is based on the probability of chromosome with less cost (best fit chromosome) • The probability is calculated from the following equation CROSSOVER • In this problem order crossover (OX) is adopted with two crossover point • The crossover procedure is as follows • It begins. At the same time strings J and K that were exchanged maintain their positions: .

• For the final stage the X’s are replaced with strings J and K: • OX has the advantage that the relative ordering is preserved. although the absolute position within the string is not. Only this chromosome is allowed to survive and others are discarded. . MUTATION • In this problem mutation combined with local search is employed • In this method the mutations induced chromosomes are gathered and searched for the fittest one.

c_ij – cost to transfer material from i to j d_ij.OBJECTIVE FUNCTION The objective is to minimize the equation below Total Cost= ∑∑∑ c_ij.frequency of material transfer from i to j .distance between i to j f_ij.*d_ij.*f_ij Where.

tsum=0. end tsum=0.SAMPLE CODE %-------------Initial Population and Cost generation--------iga=0.*f_ij. pop=zeros(npop.:)=randperm(nvar). meanc(1)=mean(MHC).*d_ij. pop=pop(ind. end MHC(i2)=tsum.nvar). cost=c_ij.ind]=sort(MHC).1). minc(1)=min(MHC). MHC=zeros(npop.pop(i2.j1). for i1=1:npop pop(i1.j1+1)).j1) . for i2=1:npop for j1=1:nvar-1 tsum=tsum+cost(pop(i2. %(i2.:). end [MHC.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->