NTNU main page

Ant-like Mobile Agents - NS2 Patch

This is a recipe for installing my NS2-patch which enables simulations of swarms made up of ant-like mobile agents.

The patch includes a routing module class RandomWalk_swarmrtm for a swarm type (ant-like agent type) doing a random walk between a source node and a destination node. The random walk swarm inherits functionality from a basic swarm routing module class swarm-rtmodule. Most of the added functionality is located in a ns-2.30/swarm folder.

NOTE: The patch is very much under development, hence it comes as is. The only documentation available at the moment are comments in the code.

  • Download the ns-allinone-2.30 i.e. version 2.30 of NS2. (If 2.30 is no longer the latest version, look in the NS2 web site archives)
  • Extract ns-allinone-2.30.tar.gz
  • Download my (latest) ns2-patch.
  • Move into the ns-allinone-2.30 directory, and run

    patch -p0 < ant-like_agents_for_ns2.patch

    .
  • Run ./install
  • Optional: To enable debugging of ns (using for instance "ddd") move into the ns-2.30 subdirectory and run

    ./configure --enable-debug; make clean; make depend; make

Potential pitfalls:

  • The ant patch uses STL (Standard Template Library). There might be some path confusion in some of the #include statements which include STL functionality.

Good luck.

Innholdstrek
Redaktør: Otto Wittner, Kontaktadresse: wittner@q2s.ntnu.no, Last modified: Mon Oct 2 15:18:38 CEST 2006