Professional Documents
Culture Documents
Travelling Salesman Problem: in The Name of God
Travelling Salesman Problem: in The Name of God
University of Tehran
Faculty of Engineering
Instructor : Dr.Samadzadegan
Email : m.ghandhary@yahoo.com
Mumbai 1
Nagpur 2
Calcutta 3
Delhi 4
Bangalore 5
Chennai 6
1 2 3 4 5 6
1 2 3 4 5 6
F(Initial_tour)=7209
Current Position 1 2 3 4 5 6
Neighbor 1 4 3 2 5 6
1 2 3 4 5 6
• Initial tempature=2000
• 0.8
Current Position 1 2 3 4 5 6
Neighbor 1 4 3 2 5 6
F(Current_Position)= 7209
F(Neighbor)= 6741
F(Neighbor)<F(Current_Position) -> Move to new position
Current Position 1 2 3 4 5 6
Neighbor 1 2 3 5 4 6
1 2 3 4 5 6
Population Fitness
[2 3 4 1 5 6] 6404
Elite Bees (e=3) [4 3 1 5 6 2] 6872
[4 2 6 5 1 3] 6872
[2 3 6 4 1 5] 8349
Best Bees (m-e=2)
[4 5 2 3 6 1] 8686
6404 [2 3 6 1 5 4] 8240
Neighbor couldn’t improve elite, so this point remain
Farhad Samadzadegan, Ph.D Farhad Samadzadegan 116
Geomatics Engineering - University of Tehran Geomatics Engineering – University of Tehran
• Recruit bees for other sites: There are Nb bees for
searching around each other best sites. (Nb=2)
• For example, 2 bees should search neighbors of point 5.
the best bee in this patch, replace 5th point
• Neighborhood size= swap two nodes
Best Bees Neighbors Fitness
[4 1 2 3 6 5] 7462
[4 5 2 3 6 1]
8686 [5 4 2 3 6 1] 8240
The neighbor improve best bee, so it replace
Farhad Samadzadegan, Ph.D Farhad Samadzadegan 117
Geomatics Engineering - University of Tehran Geomatics Engineering – University of Tehran
• For remaining bee (n-m=10-5=5) explore search space
randomly and replace bees which are not in the best
bees
Population Fitness
[5 2 6 4 1 3] 9502
[3 2 6 5 1 4] 6404
[2 5 6 4 3 1] 7786
[2 1 6 3 4 5] 8479
[3 5 4 2 1 6] 8862
NO X Y
1 4.0736 0.4877
2 4.5289 1.3924
3 0.6349 2.7344
4 4.5668 4.7875
5 3.1617 4.8244
– Number of ants: 4
– Initial pheromone: 1
– Evaporation rate: 0.3
– Number of best ants: 2
– α=1 , β=1
– r0=0.5
– Maximum number of iteration: 100
Fitness d12 d 23 d 34 d 45 d 51
1.0129 4.1188 4.4357 1.4056 4.4316 15.4046
max{ t h } if r 0.5
j
J if r 0.5
11 ( 4.4316
1 )1 1
P51 4.4316
0.1492
11 ( 4.4316
1 )1 11 ( 3.6942
1 )1 11 ( 3.2792
1 )1 11 ( 1.4056
1 )1 114.1497
75.4589
11 ( 3.6942
1 )1 1
P52 3.6942
0.1789
11 ( 4.4316
1 )1 11 ( 3.6942
1 )1 11 ( 3.2792
1 )1 11 ( 1.4056
1 )1 114.1497
75.4589
11 ( 3.2792
1 )1 1
P53 3.2792
0.2016
11 ( 4.4316
1 )1 11 ( 3.6942
1 )1 11 ( 3.2792
1 )1 11 ( 1.4056
1 )1 114.1497
75.4589
11 ( 1.4056
1 )1 1
P54 1.4056
0.4703
11 ( 4.4316
1 )1 11 ( 3.6942
1 )1 11 ( 3.2792
1 )1 11 ( 1.4056
1 )1 114.1497
75.4589
max{ t 4i h 4i } if r 0.5
j
J if r 0.5
• r=0.3
1 1
t 41 1 0.2311
d 41 4. 328
1 1
t 42 1 0.2945 Max
d 42 3 .3953
1 1
t 43 1 0.2254
d 43 4.4357
Farhad Samadzadegan, Ph.D Farhad Samadzadegan
Geomatics Engineering - University of Tehran Geomatics Engineering – University of Tehran
• From 2th node, 2 acceptable links are available
• 5th and 4th and 2nd nodes are in Tabu list
• Similar to previous nodes ant move on graph
and complete its tour
1
t ijl
Dl