Adam Campbell's Website
Sensor/Emitter simulation


Code and documentation

Download the code
View the PDF documention
View the Javadoc for simulation package
View the Javadoc for utility-function package

General description

This simulation models a sensor network in a two-dimensional environment consisting of sensors and emitters. Both sensors and emitters are assigned one of N different frequencies, with sensors in frequency i being able to detect emitters in frequency i. Each sensor is described by its position in the environment, the frequency it is sensing, and its communication distance. Each emitter is described by its position, the direction of its signal, the distance the signal travels, the angle the signal spreads, and the frequency of the signal.

The simulation is written in Java 1.5.0 and uses the MASON Multiagent Simulation Toolkit Version 13. Make sure to install the latest version of the Java SDK before running and compiling the program. All simulation code can be found in the mason/sim/app/sensor_emitter/ directory, and generic utility files can be found in mason/sim/util_amc/.

Compiling and running the code

To run the code, download and extract it. (Go to http://www.gzip.org if you need help extracting tar.gz files.) Next, enter in to the mason directory and type the following to compile the code:

javac sim/app/sensor_emitter/*.java

To run the simulation visualization program, go into the mason directory (if you're not already there) and type:

java sim.app.sensor_emitter.GraphicalUserInterface

To run the simulation without any visualization (useful if you want to gather statistics by running a batch of runs), type

java sim.app.sensor_emitter.Simulation -for [number of steps]

from the mason directory. number of steps is an integer value indicating the number of steps to run the simulation.

In the mason directory is the configuration file, run.conf used to specify the number of sensors, emitters, etc. for each run. The details of these parameters can be found in this PDF document. Any questions, comments, or suggestions can be sent to me.

Example runs

Example 1: The following example illustrates a stationary, grid network monitoring four frequencies. The three emitters wander in a fixed pattern throughout the environment. The run.conf file for this run can be found here.

Example 2: The next example shows the state of the simulation after the sensors have wandered around their environment. Like the previous run, the three emitters move in a fixed pattern throughout the environment. The run.conf file for this run can be found here.