As previously mentioned, the topographical map of Rocky Mountain
National Park has 128 ¥ 128 elevation points. If x and y are encoded in
two genes, each with Ngene = 7 bits, then there are 27 possible values for x and
y. These values range from 40°15¢ £ y £ 40°16¢ and 105°37¢30≤ ≥ x ≥ 105°36¢.
The binary translations for the limits are shown in Table 2.2. The cost
function translates the binary representation into a decimal value that repre-
sents the row and column in a matrix containing all the elevation values.
As an example, a chromosome may have the following Npop ¥ Nbits binary
representation:
Variable Binary Decimal Value
Latitude 0000000 1 40°15¢
Latitude 1111111 128 40°16¢
Longitude 0000000 1 105°36¢
Longitude 1111111 128 105°37¢30≤
This chromosome translates into matrix coordinates of [99, 25] or longitude,
latitude coordinates of [105°36¢50≤, 40°15¢29.7≤]. During the optimization, the
actual values of the longitude and latitude do not need to be calculated.
Decoding is only necessary to interpret the results at the end.
TABLE 2.3 Example Initial Population of 8
Random Chromosomes and Their Corresponding
Cost
Chromosome Cost
-12359
00101111000110
-11872
11100101100100
-13477
00110010001100
-12363
00101111001000
-11631
11001111111011
-12097
01000101111011
-12588
11101100000001
-11860
01001101110011