Ant Colony Algorithm in NS2 for Wired Networks.
Please follow the video for full instructions
I am running in Ubuntu 20.04
There are multiple files in Ant Colony (we use a protocol called Antnet) which i have already included in my blog called
https://www.nsnam.com
Lets go to my Blog. And Search for Ant Colony and Download the complete folder AntNet as shown in the video.
Now Copy paste the files in their corresponding location:
My Location if ns2 is
/home/pradeepkumar/ns-allinone-2.35/ns-2.35/
Inside this folder, the files have to be pasted in differnet sub folders...
Let me show you one by one...
cmu-trace.cc and cmu-trace.h have to be pasted to ~trace/
drop-tail.cc and drop-tail.h ---- ~queue/
Makefile.in to be replaced in the ns-2.35/ folder.
ns-default.tcl, ns-lib.tcl and ns-packet.tcl to be pasted at
~tcl/lib
packet.h to be replaced at common/ folder.
priqueue.cc and priqueue.h to be pasted at queue/
antnet/ folder have to be copied to ns-2.35/ folder (this is very important as this is the main algorithm.)
Step 2:
Change the GCC and G++ compiler in the Makefile.in as this is very important, else you might get errors if you leave the default GCC.
Please refer my following video on how to install ns2.35 in ubuntu 20.04.
Open Makefile.in
Change the following lines as given below
CC = gcc-4.8
CPP = g++-4.8
Step 3: Now Compile it
Open a Terminal.
$] cd ns-allinone-2.35/ns-2.35/
$] ./configure
$] make clean
$] make
This might take some time based on the speed of your computer.
Without errors, successfully installed....
Step 4:
Now lets understand the algorithm and packet structure.
Step 5:
Running the TCL File.
$] ns simpleant.tcl
We got three files simple.tr and simple.nam and rtable.txt
https://www.nsnam.com/2014/11/app-tool-for-analysing-tracefiles-for.html?q=ant+colony
Use of APP Tool Master.
URLs
Ant Colony Algorithm
https://www.nsnam.com/2015/03/ant-colony-algorithm-antnet-in-ns-235.html
APP Tools to analyse trace files.
https://www.nsnam.com/2014/11/app-tool-for-analysing-tracefiles-for.html
To download the Ant colony algorithm
https://drive.google.com/drive/folders/0B4nUSbTYSK4TflVJRDVXQ1QzTUo0bUJWUlAyZkx4UFdzQzJhYkpvWXU5N0k4QlE5Yl9tOFE
Thanks for watching my video...



