You are on page 1of 43

|  

 


  
   
|  
 

O   
|

  |
  

  

   ! " 
  # $
 %   & ' 
  |# 
|  


&
 |  

 |    
" 
  # 

  &
  ' 
  # '' 
 ( 
 &   & 
 "  
) #    "    
  

 | & #  &'


"  

  &   &    #  

    #   
    
  
& #

**"""++  + *, " **-..-/0* * 1/21/3+'


**"""++  + *, " **-..-/0* * 1/21/3+'
**"""++  + *, " **-..-/0* * 1/21/3+'
**"""++  + *, " **-..-/0* * 1/21/3+'
**"""++  + *, " **-..-/0* * 1/21/3+'
**"""++  + *, " **-..-/0* * 1/21/3+'
 ' 

     

    
 |  & 
 4'  &' (
 |     
%   & '  
 # #


 5 

  

 6 

 | 

 7 

  

%   & ' 

| |# 
8 !9+
 (8    2+:
 !"""+  +$
%   & ' 
Ë  
  Ë 

Ë  
       
   


      ! 
"  # $  !  

 9
 %9; 

    
  

  

+
|'7 & # 
9

77 9  &
 
  )'
|  
     

"  # | " '       
'     
(  "  
 # 
&  +

77 9"  '


  

   
"   
 
ï   '
 %9; 
 
  
  
ï  &  ) +   # 
 &   

    
 %

&   
%

Ë      —  


       Ö ðR—'
    (

   % #   


% #  !r ðR—' %   


R  —   !  ( #
|  #ð| '

|  
'7 9
: !%$"%<  * <#

a ‰    


       

| 
&'
    )=" 
       +


|


|  #|! #Ë 
Initialize

Place each ant in a randomly chosen city

For Each Ant

Choose NextCity(For Each Ant)

 more cities


to visit

%

Return to the initial cities

Update pheromone level using the tour cost for each ant

%
utopping
criteria



Print Best tour


! Ë   ! 

° 5     &  


 a
4' # # !  $'     &  
°
+ a <   ! 
a >      ' # ="    +

ph
3+ #  !7   # '
a
'
 

Ë  % !  ' (#'


   ="   # +

 

   

Ë !% #  |

|'
  '    

 

a ph ' #   +  "" 


 '
+

Ë     


>"

   #

| 

 # 

&  9 ( )


    + 


9
  r a


 7 

%)
& 4   
& 
|
 7 9)
 )*

)*

|
?
"

)*


,

)*

+

 )*

|.//01.2/30&.-/
-
   

)|* )*

 "
|
?
)1*

,


)&* )*

+  -

>"  );  @

)|*


|
)|*
?

 r a  p   a =
)|*


      
 a  p    )|&*
=
r a  p   a 
  

)|* 

     
  
 


   
)|* )1*

- ,
|
?
)1*

"


)|&*
)&*


 +

   3

)&|* )|*

+ -
|
?
)|&1*




)1&*
)1*

"
 ,


   A
)1&|* )&|*

" +
|
?
)|1*

-


)1&*
)|&1*

 ,


   .
)1&|* )|&1*


,
|
?
)&|1*

+


)|1&*

)1&|*

 -

 "
9  9
 &   
)|&1*

 a  a  

 .,// r a  
   
  
)1&|*

" .+-/
"
)1&|*

p p  , ."2/   '


r
,
 r   r   r   r   r 
)&|1*

+ ."4/
+

)|1&*

- .+"/
-
5 

  Ëð 6  ! '

|!!

  
|  
!| $ #BC--


h  

 !
 
 

  

p  h a  =
 r a  

 

 $ 
Ë 
  

   r  p     =
 

  p      r  pa      a$
a

a a
=
 
 
 
 
   r  p  

    

 
= 
 p   
a

  a a 

  


" #



$ 

  

$
    
 $ 

 $   
 h 

 

  
   

 

 


 


      h

ra p   ra p   ra 


r a  p     r a  p 
 

°
 


ra

  a  a  
   
  
r 
a   


 
 $ 

 a  a   
   
 
  
r a  r a  r a


 
& 
r a




%%°  
 


   



'
 # 

  #  
  )    
:  |

 |     


 9        
   &  #  
    
  
; >   '
 
; 9
  
 6 '
 2  #
 
  '
      
  
:  |

 | "(      


  &    &   


     #  
±    '|  

 | !!%+ 3$
 |   !D  D$
 | D  !D  D* =$

7 ( '
 #BC
?  |  

7 ( '
 #BC
?  |  

7 ( '
 #BC

 
' '|

7 ( '
 #BC

   &  #

 9  & (  '   &


'#  
   
    & 

 &# 
 7#  '   
         #
' +
 7 &    '    '
# +
  &  # |  


 " &#  >  


 9'
'7 9
 #
 E.  +
 %   # | 
" #  
|    

 7 & # 
9

 D   | #
 9

 %"(9

 ±  #
5( 

9

 | |# 

 0 
7 & # 
 #  F | --
:
 F # | ;D --.

 #F:
 | F| 3 --G

 F> | --E

? 
> F   |  ( --E
  + ?5| ///
D     #
     F # | ;D|9 --A

:
 7  F # >| ;D|9 --E

 F> | ;D|9 --H

   |%7 ;D|9 ---


  F | ;D|9 --A
 #
   #F   | ;I 9 --E

  | ; 779 ---

? (  | ; 779 ---

 ?   F # | ; 7579 ///


(  'F 
( |;69 --E
±  # ? 
> F   | ;±69 ---

:
 7  F|# >| ;±69 ---
5( 
9

 | |# 

 0 

   ;    " + |? --G


"( # 5 9 #(F  | :| --H

  F # | %; --H

?   + |?;
  --H
   ;   F # | %F| %;| --E
"( # 
F 6#   --E

> + | --H


& 9F6(  |?; ("  --H
J   # :
 F # >| ; 9 --E
:  #  F> |%72 --E



 J   F  ' | K  --H

J   #
    F   |%7 ;|9 --H
:     #
  6
 2 F  | ;:|9 --H
 (  ( 2#
 F  "  | ;9 ---
   "( # % & ±  F   |;±59 ---
6      2 #F
 |;6|9 ---
    '     | ;9;& ///