03.01.2015 Views

a multi-objective bisexual reproduction genetic algorithm for ...

a multi-objective bisexual reproduction genetic algorithm for ...

a multi-objective bisexual reproduction genetic algorithm for ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

51<br />

The new offspring is created from an empty chromosome, and then it is inserted<br />

alternately with genes from mother and father. Because a n-credit course will be<br />

scheduled to n successive time-slots, successive time-slots have to be copied from<br />

mother and father. To facilitate this, all time-slots of morning or afternoon working<br />

sessions will be copied from the mother or father to the new offspring.<br />

Usually the new offspring is not correct thus it needs to be repaired. If a course<br />

has not been scheduled yet, it also needs to be scheduled. In the contrary, if a course<br />

has been scheduled more than one time in a week, it has to be removed.<br />

A pseudo code <strong>for</strong> crossover is given in Figure 3-20.<br />

Crossover rate pc=0.5<br />

Father x= a chromosome is chosen randomly from the population<br />

Mother y= a chromosome is chosen randomly from the population (y≠x)<br />

For each day in a week<br />

For each working-session in [morning, afternoon]<br />

For each classroom<br />

If (random(100) < pc*100)<br />

Copy afternoon time-slots of father x to afternoon time-slots of the new offspring z<br />

Else<br />

Copy morning time-slots of mother y to morning time-slots of the new offspring z<br />

Mutate the new offspring z<br />

Repair the new offspring z<br />

Calculate fitness value <strong>for</strong> the new offspring z<br />

Insert the new offspring z into the population in order of fitness value<br />

FIGURE 3-20 Pseudo code <strong>for</strong> crossover<br />

If the crossover rate pc is chosen to be 50%, the 50% of the genes from the<br />

mother and 50% of the genes from father are copied to the new offspring.<br />

3.6.6 Mutation<br />

A new offspring that has just been created by crossover will be mutated with a<br />

mutation rate. This is done via the following process: go through each gene and swap<br />

its content with another gene in the same chromosome.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!