Programming the DLL for Combinatorial Problems

<< Click to Display Table of Contents >>

Navigation:  Chapter 7 - Programming Combinatorial Problems with the DLL >

Programming the DLL for Combinatorial Problems

Previous pageReturn to chapter overviewNext page

Building a GA for enumerated chromosomes is much the same as building one for continuous chromosomes.  There are a couple of minor differences:

 

1. MakeEnumChromosome is used instead of MakeChromosome.

 

2. SetEnumOperators is used in place of SetOperators.

 

3. GetEnumChromosome and PutEnumChromosome are used instead of GetChromosome and PutChromosome. Note that enumerated chromosome “Getting” and “Putting” involves the movement of integer arrays instead of the movement of simple floating point values.

 

Other than these differences, the evolution process is essentially the same.  When you call the fitness function, you will be passing all of the genes in the enumerated chromosome.  As a matter of fact, it is possible to build a GA which contains both continuous and enumerated chromosomes, and multiple chromosomes of each.