Javis/NAM Network Animators for JiST/SWANS simulator



Introduction to Javis/NAM

Javis is a packet flow and network animator. Simulation results from various network simulators can be captured and fed into Javis after a run has completed.  Javis can show a network topology, nodes locations, links between nodes, demonstrate the flow of messages send upon links, topology evolution over time, etc...

Javis is a Java based version of NAM. NAM is a widely used Network Animator, used with ns-2 simulator. NAM accepts ns traces files, and presents the animation of the simulation based on them. Javis accepts traces files in the same format as NAM. Till now Javis was mainly used with JNS, which  is a Java version of the ns-2 network simulator originally from Berkeley.


Porting of JiST/SWANS to Javis

JiST/SWANS simulator is a Scalable Wireless Ad hoc Network Simulator developed in Cornell (http://jist.ece.cornell.edu/index.html).

I took the code that was used by JNS to create Javis/NAM trace files in the NAM format and adapted it to SWANS code. The main issue was to output SWANS events into the file in the correct NAM format. For the meanwhile, I have only implemented taking a snapshot of the network topology: nodes locations and links between the nodes. This code was added into jist.swans.field.Field class. More work (not too much) should be done to add support for packets and flows (in the jist.swans.net.NetIp class) and for nodes movements (in the jist.swans.field.Field.moveRadio() function).

The code - version 1 of porting of SWANS to create Javis/NAM trace files:


So there are two animators you can use:

Generally, Javis has limited functionality - it does not yet support all NAM format options, but it does support the most important ones.
In addition, I also had to do some hacking into the Javis code itself, since for some strange reason, it did not output nodes at their correct locations, but at random places, with link restrictions (
manual layout specified in trace files was ignored). In the fixed version above nodes are being placed at their correct locations, specified in the trace file.




Other relevant projects

XTend-SWANS - NAM  Extension for JIST/SWANS Simulator
XTend-SWANS is a further extension patch developed for JiST/SWANS version 1.0.6 for extending the capabilities of  SWANS network simulator. This package augments my above extensions of SWANS with additional event traces from simulations which can be animated using NAM. XTend-SWANS  was developed by Emre Atsan.

SWANS++  - extensions for the JiST/SWANS wireless network simulation testbed. It currently includes a mobility model for wireless vehicular ad-hoc network (VANET) simulations and a visualization tool. Source Forge SWANS++ project.


Gabriel Kliot