The GA Procedure

SetEncoding Call

specifies the problem encoding

call SetEncoding( encoding );

The input to the SetEncoding subroutine is as follows:

encoding        is a string used to specify the form of the solution.

The SetEncoding subroutine is used to establish the type of problem solution encoding. The encoding parameter should be a string of letter-number pairs, where the letter determines the type of encoding: I for integer, R for real-valued, S for sequences, and B for Boolean values. Each letter is followed by a number to indicate the number of components for that encoding. Multiple letter-number pairs can be used to specify a multisegment encoding. For example, the following call specifies that solutions be in the form of a 10-member integer vector:

  
    call SetEncoding('I10');
 

The following call specifies that solutions have a 5-component integer segment and a 10-component real-valued segment:

  
    call SetEncoding('I5R10');
 

See the section "Using Multisegment Encoding" for details on using multisegment encoding.

Previous Page | Next Page | Top of Page