The main problem is that, in RND problem, we only use 100 transmitters, but in RND2 problem we have to take 149. So, now, we have chromosomes of 149 bits (1 for gene length multiplied by 149 for the number of genes), where each gene represents a transmitter, and it indicates if the transmitter is part or not of the solution. The transmitters will be placed on a grid of 287x287, where each one has a covering cell of 41x41. We will place in a regular way 49 transmitters so that they cover all the grid, and the other 100 will be placed on aleatoty positions in the grid. All these positions are already fixed inside the problem, that is, inside the class RND2, we have a list of 149 couples and they indicate the positions of each transmitter. Contrary to the previous implementation, now each island is going to work with the same problem, because all the transmitters are placed, at the beginning of the problem, in the same position.
In the previous version we could only work with a grid of a maximum size of 127 bits, this is because the variable that contains the value, SIDE_LENGTH, was defined as byte. This type allows a maximum of 8 bits for numerical representations. But in Java all the types are signed, so, it reserves a bit for the sign. We only could use 7 of those 8 bits to represent numbers and, as maximum, we could represent (2^7) - 1 = 127. But in this new version we have assigned to SIDE_LENGTH a short variable that can use 16 bits and it can represent the size of the grid (287) .
Modifications realized on the class Island.
... |
458 short SIDE_LEGTH=0; |
... |
577 SIDE_LENGTH=Short.valueOf)st.nextToken()).ShortValue; |
... |
833 problem = new RND2( SIDE_LENGTH, CELL_OF_TRANS, GENE_LENGTH); |
... |
Modifications realized on the class Problem.
... |
55 public short get_side_length() |
... |
As we have seen, the other classes don't suffer many modifications, only the relatives to the managing of the variable SIDE_LENGTH, in the change of type, and in the call to the RND problem, that we have to change it into the RND2.
IMPLEMENTATION
|
||
Characteristics
|
RND
|
RND2
|
Evaluation Functions
|
Original Function Average use Average + Deviation use Penalized |
Original Function
|
Genes number (transmitter)
|
Normally 100- max 127
|
149
|
Gene Length
|
13 bits; 1 bit for activation,
6 bit for coordinate X, 6 bit for coordinate Y
|
Only 1 bit for activation.The
transmitter positions are designed since the beginning.
|
Chromosome Length
|
100 x 13 = 1300 bits
|
1 x 149 = 149 bits
|
Side Length
|
Normally 64
|
287
|
Side Length variable type
|
byte
|
short
|
Cells of transmitter
|
7
|
41
|
Fitness solution
|
Depend of the parameters
|
204.08
|
Form to place transmitter
|
aleatory in each island
|
49 regularly and 100 randomly
but fixed in every island
|
Print types
|
With pilling up andWithout pilling
up
|
With pilling up but the transmitters
are showed, and the matrix is collocated in a file
|