Go directly to main content

WSNet / Worldsens simulator

An event-driven simulator for large scale wireless sensor networks

Tools / Utilities

Several tools are included within the WSNet distribution:

wsnet-topogen: description and usage

Once WSNet is properly installed within the /usr/local/wsnet2.0/ directory, one can run the topogen utility by typing the following command:

$  /usr/local/wsnet-2.0/bin/wsnet-topogen

If the WSNet install directory is already included in the PATH, one can directly type the following command:

$  wsnet-topogen

The purpose of topogen is the generation of random geometric graphs which can be used by the WSNet simulator for scenarios with static node positions. The main options are (type wsnet-topogen --help for a more complete list):

Here are some examples:

Rectangular area of size 500x300 with a uniform node distribution according to a PPP of intensity 0.01 (screenshot 1):

$  wsnet-topogen --topo rect 500 300 20 --distribution uniform 0.01 --output graph.data

Square area of size 400x400 with 2000 nodes distributed uniformly and randomly at the exception of 6 holes of radius 30 (screenshot 2):

$  wsnet-topogen --topo square 400 20 --distribution static 2000 --effect hole 6 30 --output graph.data

Circular area of radius 200 with a uniform node distribution according to a PPP of intensity 0.008 together with 4 clusters of size 50 and a node density of 0.05 (screenshot 3):

$  wsnet-topogen --topo circle 200 20 --distribution uniform 0.008 --effect cluster 4 50 0.05 --output graph.data

Output format:

By default topogen uses the WSNet 2.0 format as follows:

0 148.427 54.330 0
1 368.821 237.280 0
2 202.109 363.953 0
3 319.671 86.659 0

where the columns represent the node id and the (x,y,z) positions, respectively. It is possible to adopt a user-defined format for using the obtained graph with other simulators. For example:

[ Back to Top ]

wsnet-replay: description and usage

wsnet-replay is a graphical tool that replays offline a simulation scenario:

Once a simulation scenario is finished, one can replay the simulation by typing the following command:

$  wsnet-replay [log-filename] [zoom]

The log-filename must contain the output generated by WSNet with only the LOG_REPLAY macro defined. Please refer to the FAQ for more details on WSNet logs.

[ Back to Top ]

Matlab scripts

Several matlab scripts are included in the WSNet distribution. They can be used for statistical analysis.

The energy distribution can be easily analyzed using map2png and maps2video.

When performing a simulation using WSNet it is possible to use a monitor entity to log periodically the network parameters (e.g., energy consumption, active nodes, ...). The obtained log files can then be analysed using the matlab scripts.

For example: from the log files generated by the nrj monitor entity, one can generate an avi video showing the evolution of energy consumption by running the following command on matlab (view video screenshot):

>>  maps2video('./log/','energymap','video.avi', 0, 50000, 1000, 400)

This command generates an avi video showing the evolution of the network energy distribution from 0s to 50s with a period of 1s and an area size of 400x400. Please refer to the FAQ for a detailed description of these scripts usage.

[ Back to Top ]

wsnet-run-simulations: description and usage

wsnet-run-simulations is a shell script that runs a batch of simulations from a same scenario or from multiple scenarios but with different random seeds and stores the log files within a specified directory for further analysis. This script can be used as follows:

$  wsnet-run-simulations  [option] [config-file/directory]  [output-directoy]  [simulation-number]


[ Back to Top ]