• The distances are taken as integer values. If you want to use real numbers as distances, the type
for distance matrix needs to be changed to float, and corresponding changes are needed for calcdist (
) function, etc.
•
tourcity and tourorder arrays keep track of the cities that have to be covered and the order in
which it is to be done.
• A neuron corresponds to each combination of a city and its order in the tour. The ith city visited in
the order j , is the neuron corresponding to the element j + i*n, in the array for neurons. Here n is the
number of cities. The i and the j vary from 0 to n – 1. There are n
2
neurons.
•
mtrx is the matrix giving the weights on the connections between the neurons. It is a square
matrix of order n
2
.
Do'stlaringiz bilan baham: |