<< Click to Display Table of Contents >> Tutorial Step 5 |
|
Chromosome Type GeneHunter uses two types of chromosomes to solve problems:
Continuous Chromosomes: This type is used when the adjustable cell can take on a value that may be within a continuous range of values, such as the value 1.5 within the range 0 to 2. Continuous chromosomes may also be integers if you want to restrict the search space. Each adjustable cell may select a value from a separate range of values for each cell that is specified in the Constraints section (described below). In the Camping Trip example, continuous chromosomes are used and the integer box is checked because only whole servings of food may be catered.
You may also use the integer box to assign integer values to single cells or multiple ranges of adjustable cells. Suppose that, in the Camping Trip example, you want only cells $E$8 and $E$11 to have integer values. Click on the integer box, and in the edit box, enter $E$8, $E$11. In the case of multiple ranges, you may enter the values $E$8:$E$13, $F$7:$F$12, for example. Commas are used as the separator for both single cells and entire ranges. Please note that if you select "enumerated" as a chromosome type, the integer box on the main dialog will disappear, since enumerated chromosomes use only integer values.
Enumerated Chromosomes: This type is used when only integer values may be used in the adjustable cells. If the enumerated chromosome type is selected, then all of the cells listed in the Adjustable Cells text window will create a single enumerated chromosome. These cells will be the genes (tokens) of that chromosome, and their values will be used for the initialization of that chromosome in the GeneHunter memory.
Therefore, when you are going to use a range on the worksheet as an enumerated chromosome, all of the cells in this range must initially contain reasonable values related to your problem. What values do you put in the range? It depends upon the type of enumerated chromosome (repeating/unique), and upon your problem. The function of the GA is to find the optimum order of these values that you have initially placed in the chromosome. The values with which you initialize the cells must contain at least one of each of the possible values. For unique genes, only one of each possible value may appear in the cells initially.
There are two types of enumerated chromosomes.
Repeating genes: The values in the adjustable cells must be an integer within a specified range, but a specific value may appear in more than one adjustable cell. This type of enumerated gene may be used to group stocks in a portfolio or to group workers into teams.
Unique genes: The values in the adjustable cells must be unique integers within a specified range. This type of enumerated gene may be used to find a route among a list of cities that need to be visited by a traveling salesman, and each city may be visited only once. In other words, no duplicates are allowed, and the number of genes is usually equal to the range of integers, so each integer appears once and only once.
In the Camping Trip example, continuous chromosomes are used and the integer box is checked because only whole servings of food may be catered.
Note: You may be confused concerning the difference between using continuous integer chromosomes and using enumerated repeating chromosomes. The difference is that continuous chromosomes are adjusted independently of each other. Adjustments to genes of an enumerated chromosome are made considering the whole chromosome. This is a very subtle variance, but one which can have an effect on how some problems are solved.
|