Difference between revisions of "Agilla's Network Topology"

From Cyber-Physical Systems Laboratory
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
Sometimes there is not enough space, time, or debugging resources to deploy a truly multi-hop WSN.  For this reason, Agilla provides a mechanism that simulates a multi-hop network by filtering messages sent from specific nodes.  Nodes are arranged in a grid and their location within the grid is calculated based on their TinyOS address. where their location in the grid is calculated based on the address of the node.
+
Sometimes there is not enough space, time, or debugging resources to deploy a truly multi-hop WSN.  For this reason, Agilla provides a mechanism that simulates a multi-hop network by filtering messages sent from specific nodes.  Nodes are arranged in a grid and their location within the grid is calculated based on their TinyOS address.
  
The following notes apply to Agilla versions 2.x and 3.x.  Note that Agilla 2.x enforces a grid topology whereas Agilla 3.x does not.  For a description of the grid topology enforced in Agilla 1.x, see [[Agilla 1.x Grid Topology|this page]].
+
The following notes apply to Agilla versions 2.x and 3.x.  Note that Agilla 2.x enforces the grid topology whereas Agilla 3.x does not (the user can disable the grid topology by setting both ENABLE_NEIGHBOR_LIST_FILTER and ENABLE_GRID_ROUTING to be 0 in $TOSROOT/contrib/wustl/apps/Agilla/Makefile.Agilla).  Agilla 1.x users should see [[Agilla 1.x Grid Topology|this page]].
  
 
== Description ==
 
== Description ==
Agilla creates an artificial multi-hop sensor network arranged in an n x m grid by filtering out messages from non-neighbors. A node can only communicate with its immediate neighbors based on the grid topology, i.e., each node in the grid can communicate with its immediate horizontal, vertical, and diagonal neighbors, for a maximum of 8 neighbors. A node is identified by its (x,y) location, which is calculated based on its address. Only one node can be located at a particular (x,y) location at a time. The network grid is arranged in row-major order starting with location (1,1) at the corner. The mote connected to the base station is treated like a regular node, it can be at any valid grid location and its neighbors are based on its position in the grid. Note that this differs from Agilla 1.x where the base station was treated as a special case with an address of (0,0) and the entire first row as its immediate neighbors. In Agilla 2.x, the base station can move and is treated like any other node.
 
  
The grid location and node address is calculated as follows:
+
Agilla creates an artificial multi-hop sensor network arranged in an ''n x m'' grid by filtering out messages from non-neighbors. A node can only communicate with its immediate neighbors based on the grid topology, i.e., each node in the grid can communicate with its immediate horizontal, vertical, and diagonal neighbors, for a maximum of 8 neighbors. A node is identified by its (x,y) location, which is calculated based on its address. Only one node can be located at a particular (x,y) location at a time. The network grid is arranged in row-major order starting with location (1,1) at the corner. The mote connected to the base station is treated like a regular node, it can be at any valid grid location and its neighbors are based on its position in the grid. Note that this differs from Agilla 1.x where the base station was treated as a special case with an address of (0,0) and the entire first row as its immediate neighbors. In Agilla 2.x, the base station can move and is treated like any other node.
  
<pre>
+
A node's address related to its grid location as follows:
ID = (x - 1)+ (y - 1) * (number of columns)
+
 
</pre>
+
<pre>ID = (x - 1)+ (y - 1) * (number of columns)</pre>
  
Alternatively, given the node ID, its location can be calculated as follows:
+
The following equations calculate the x and y coordinates from the Node ID:
  
 
<pre>
 
<pre>
Line 19: Line 18:
 
</pre>
 
</pre>
  
For example, in a 4x4 network, the nodes would have the following IDs and locations:
+
For example, nodes would have the following IDs and locations in a 4x4 network:
  
 
[[image:agilla2x_grid.jpg|thumb|center|425px|The grid coordinates and node IDs in a 4x4 WSN]]
 
[[image:agilla2x_grid.jpg|thumb|center|425px|The grid coordinates and node IDs in a 4x4 WSN]]
  
Agilla implements a simple greedy-forwarding where each agent simply looks at its neighbors and forwards a message to whichever neighbor is closer to the ultimate destination. If there are no neighbors closer to the destination than the node itself, the migration and tuple space access operation will fail. It does not adopt to node failure or perform neighbor discovery.
+
Agilla implements a simple routing protocol based on greedy-forwarding where each agent simply forwards a message to whichever neighbor is closer to the message's ultimate destination. If there are no neighbors closer to the destination, the message will be dropped.   The current routing protocol does not adapt to node failures very well.
  
 
== Customizing ==
 
== Customizing ==
  
The default grid size is specified by the number of columns. It is specified by DEFAULT_NUM_COLUMNS in <agilla>/types/Agilla.h and by NUM_COLUMNS in <java>/edu/wustl/mobilab/agilla/variables/AgillaLocation.java. After changing the default number of columns, the java AgentInjector application and the NesC both have to be recompiled. The NesC code has to be reinstalled on all motes.
+
The default grid size is specified by the number of columns. It is specified by DEFAULT_NUM_COLUMNS in $TOSROOT/contrib/wustl/apps/Agilla/types/Agilla.h and by NUM_COLUMNS in $TOSROOT/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/variables/AgillaLocation.java. After changing the default number of columns, the Agent Injector and the Agilla middleware both have to be recompiled and the middleware needs to be re-installed on all the motes.
 
 
To install the NesC portion of Agilla, you can use an included gawk script that streamlines the installation process. Use it by going to <agilla> and typing gawk -f installer_m2.awk for Mica2 motes, or gawk -f installer_mz.awk for MicaZ motes. Alternatively, if you added the Agilla aliases to your /etc/profile, just type riall_m2 or riall_mz anywhere for Mica2 and MicaZ motes, respectively.
 
 
 
To recompile the Java portion, type " if you have the Agilla aliases setup, or go to <java>/edu/wustl/mobilab/agilla/variables/ and type make.
 
  
Agilla 2.x and above allows you to change the grid topology and a node's location wirelessly. You can start the AgentInjector with a "-col NUM_COL" option, which will change the default number of columns within the AgentInjector. You can change the number of columns within the sensor network by going to the WSN menu and selecting ""Change Grid Topology," or by hitting ctrl+g. To change a node's location. Note that the grid size within the network MUST match the grid size within the AgentInjector java application.
+
After the middleware is deployed, you can always change the grid topology and node's location wirelessly. You can start the AgentInjector with a "-col NUM_COL" option, which will change the default number of columns within the AgentInjector. You can change the number of columns within the sensor network by going to the WSN menu and selecting ""Change Grid Topology," or by hitting ctrl+g. To change a node's location. Note that the grid size within the network MUST match the grid size within the AgentInjector java application.

Latest revision as of 19:51, 10 December 2007

Sometimes there is not enough space, time, or debugging resources to deploy a truly multi-hop WSN. For this reason, Agilla provides a mechanism that simulates a multi-hop network by filtering messages sent from specific nodes. Nodes are arranged in a grid and their location within the grid is calculated based on their TinyOS address.

The following notes apply to Agilla versions 2.x and 3.x. Note that Agilla 2.x enforces the grid topology whereas Agilla 3.x does not (the user can disable the grid topology by setting both ENABLE_NEIGHBOR_LIST_FILTER and ENABLE_GRID_ROUTING to be 0 in $TOSROOT/contrib/wustl/apps/Agilla/Makefile.Agilla). Agilla 1.x users should see this page.

Description

Agilla creates an artificial multi-hop sensor network arranged in an n x m grid by filtering out messages from non-neighbors. A node can only communicate with its immediate neighbors based on the grid topology, i.e., each node in the grid can communicate with its immediate horizontal, vertical, and diagonal neighbors, for a maximum of 8 neighbors. A node is identified by its (x,y) location, which is calculated based on its address. Only one node can be located at a particular (x,y) location at a time. The network grid is arranged in row-major order starting with location (1,1) at the corner. The mote connected to the base station is treated like a regular node, it can be at any valid grid location and its neighbors are based on its position in the grid. Note that this differs from Agilla 1.x where the base station was treated as a special case with an address of (0,0) and the entire first row as its immediate neighbors. In Agilla 2.x, the base station can move and is treated like any other node.

A node's address related to its grid location as follows:

ID = (x - 1)+ (y - 1) * (number of columns)

The following equations calculate the x and y coordinates from the Node ID:

x = [(ID) mod (number of columns)] + 1
y = (ID – x + 1)/(number of columns) + 1

For example, nodes would have the following IDs and locations in a 4x4 network:

The grid coordinates and node IDs in a 4x4 WSN

Agilla implements a simple routing protocol based on greedy-forwarding where each agent simply forwards a message to whichever neighbor is closer to the message's ultimate destination. If there are no neighbors closer to the destination, the message will be dropped. The current routing protocol does not adapt to node failures very well.

Customizing

The default grid size is specified by the number of columns. It is specified by DEFAULT_NUM_COLUMNS in $TOSROOT/contrib/wustl/apps/Agilla/types/Agilla.h and by NUM_COLUMNS in $TOSROOT/contrib/wustl/tools/java/edu/wustl/mobilab/agilla/variables/AgillaLocation.java. After changing the default number of columns, the Agent Injector and the Agilla middleware both have to be recompiled and the middleware needs to be re-installed on all the motes.

After the middleware is deployed, you can always change the grid topology and node's location wirelessly. You can start the AgentInjector with a "-col NUM_COL" option, which will change the default number of columns within the AgentInjector. You can change the number of columns within the sensor network by going to the WSN menu and selecting ""Change Grid Topology," or by hitting ctrl+g. To change a node's location. Note that the grid size within the network MUST match the grid size within the AgentInjector java application.