720 Modern Methods of Optimization
Step 4: Assuming that the ants return home and start again in search of food, we set
the iteration number asl=2. We need to update the pheromone array as
τ 1 (^2 j)=τ 1 ( ldoj )+
∑
k
τ(k) (E 1 )
where
∑
k
τ(k)is the pheromone deposited by the best antkand the summation
extends over all the best antsk(if multiple ants take the best path). In the
present case, there is only one best ant,k=1, which used the pathx 13. Thus
the value of
∑
k
τ(k)can be determined in this case as
∑
k
τ(k)= τ(k=^1 )=
ςfbest
fworst
=
( 2 )(− 12. 0 )
(− 8. 0 )
= 3. 0
where the scaling parameterςis assumed to be 2. Using a pheromone decay
factor ofρ= 0 .5 in Eq. (13.43),τ 1 ( ldoj )can be computed as
τ 1 ( ldjo )= ( 1 − 0. 5 )τ 1 (^1 j)= 0. 5 ( 1. 0 )= 0. 5 ;j= 1 , 2 , 4 , 5 , 6 , 7
Thus Eq. (E 1 ) gives
τ 1 (j^2 )= 1. 0 + 3. 0 = 4. 0 forj=3 andτ 1 (j^2 )= 0. 5 forj= 1 , 2 , 4 , 5 , 6 , 7
With this, we go to step 5.
Step 2: For any antk, the probability of selecting pathx 1 jin Fig. 13.4 is given by
p 1 j=
τ 1 j
∑^7
p= 1
τ 1 p
; j= 1 , 2 ,... , 7
whereτ 1 j= 0. 5 ;j= 1 , 2 , 4 , 5 , 6 , 7 andτ 13 =. This gives 4
p 1 j=
0. 5
7. 0
= 0. 0714 ;j= 1 , 2 , 4 , 5 , 6 , 7 ;p 13 =
4. 0
7. 0
= 0. 5714
To determine the discrete value or path selected by ant using a random num-
ber selected in the range (0, 1), cumulative probabilities are associated with
different paths as (roulette wheel selection process):
x 11 = ( 0 , 0. 0714 ), x 12 = ( 0. 0714 , 0. 1429 ), x 13 = ( 0. 1429 , 0. 7143 ),
x 14 = ( 0. 7143 , 0. 7857 ), x 15 = ( 0. 7857 , 0. 8571 ), x 16 = ( 0. 8571 , 0. 9286 ),
x 17 = ( 0. 9286 , 1. 0 )
Step 3: Generate four random numbers in the range (0, 1), one for each of the ants
asr 1 = 0. 3688 , r 2 = 0. 8577 , r 3 = 0. 0776 , r 4 = 0. 5 791. Using the cumulative
probability range (given in step 2) in which the value ofrifalls, the discrete