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.