AntSense – A NS-2 module for Ant Colony Optimization

 

PROJECT SUMMARY

This project contains extensions to NS-2 (versions 2.27 and 2.28) which enables the ACO behavior in WSNs. The module is adaptable to the current version of NS-2 since it is installed as a new routing protocol. Written mainly in C++ the ACO module (AntSense) produces the main attributes, however it was design in order to be used by any other technology supported by this simulator.
When designing a routing protocol for WSNs it is important to consider the packet length of each type of packets used by our protocol, since, as already explained communication is an energy-expensive function. In AntSense development, several approaches were used concerning types of packets and different lengths, the configuration illustrated in this section refers to the best pattern found by the results. In ACO approach ants are considered as packets that travel the network changing routing information in order to find the best path towards the anthill, in this case towards the sink-node. The ant packet structure is composed by:

All the nodes that belong to the ant path are responsible to update the packet with the proper data, and should update also their internal information regarding the neighbor devices and pheromone levels always taking in consideration the direction of the s ant packet. As a normal protocol AntSense also requires a Hello type packets, in order for the nodes know which are the sensor nodes that are contactable with only one hop. The following structure were used in the hello packet:

It is important to emphasize that the node energy of the source is also exchange, this procedure allows a to increase the update rate in order to help ants to decide the best route based in available energy.
The AntSense file structure is divided in three different files (Figure ): antsense.cc, queue.cc, and table.cc. The first one is the main file, where the routing protocol is written, functions like ant receive and ant forwards are describe here. This main file requires the functions described in the last two files, it uses the queue.cc to manage the data packet queuing, and table.cc to decide the best neighbor device to forward ant packets and data packets.

Figure 1 – AntSense structure

All the main and “hard” equations are described in the table.cc, where a routing table is kept and updated every time a ant packet is received.
The AntSense model in a first phase was build to behave as a normal ACO approach, however as the integration in WSNs was being designed the final solution reflects several aspects of the WSN integration, i.e. reduce the ant memory to three slots, which allows us to reduce communication time
See the README and INSTALL files for complete documentation.

.

DOCUMENTATION

ASSENT: Ant-based System for Sensor Energy-Efficient Networks [uk]
Camilo, T., Carreto, C., Silva, J. S. and Boavida, F.,
ANTS2006 - Fifth International Workshop on Ant Colony Optimization and Swarm Intelligence, Brussels, Bélgica, September 2006.

 

PROJECT FILES

antsense.zip

REFERENCES:


comments and questions: tandre at dei.uc.pt