<< NARVAL_P_UnderlayInter NARVAL NARVAL_R_AggregationWCDS >>

NARVAL >> NARVAL > NARVAL_R_AggregationTree

NARVAL_R_AggregationTree

Perform the data aggregation on each node of a graph (Tree).

Calling Sequence

[d] = NARVAL_R_AggregationTree(pred,dist,s)

Parameters

pred :

vector composed by the predecessor of each node in order to reach the sink.

dist :

vector composed by the distance between each node and the sink.

s :

sink.

d :

output data.

Description

NARVAL_R_AggregationTree performs the data aggregation d (all information from its children) on each node of the graph defined by the predecessor vector pred generated by the Bellman-Ford algorithm, the Dijkstra's algorithm, BFS, DFS or the Prim's algorithm applied in the sink node s. The graph is assumed to be composed by n nodes. d is a matrix (n,n+1). We assume that each graph node forwards a packet towards the sink in respect with the path performed in respect with the predecessor vector pred. We store in each line of index i within d the source node of all packets that have crossed the node i to reach the sink. Thus d gives the relevant information about the location where it is preferable to aggregate packets in constrained environments.

Examples

n=100;//network size
L=1000;//network squared area side
r=150;//Locality radius
[g]=NARVAL_T_LocalityConnex(n,L,r);//generation of a topology
st=[1 17 5 6 2 3];//style
w=1;//window index
f=NARVAL_G_ShowGraph(g,w);//graph visualization
n=g.node_number;//quantity of nodes
sink=NARVAL_F_Random(n);//selection of the sink
[cm,np,pred]=NARVAL_R_SinkFlood(g,sink);//creation of the predecessor vector
ind=w+1;//window index
dw=5;//display parameter
[gBFS,VBFS,predBFS]=NARVAL_R_BFS(g,sink,dw,ind);//performance of the BFS algorithm
ind=ind+1;//window index
[gBFSW,VBFSW,predBFSW]=NARVAL_R_BFSW(g,sink,dw,ind);//performance of the BFS (Weight) algorithm
ind=ind+1;//window index
[gDFS,VDFS,predDFS]=NARVAL_R_DFS(g,sink,dw,ind);//performance of the DFS algorithm
ind=ind+1;//window index
[gDFSW,VDFSW,predDFSW]=NARVAL_R_DFSW(g,sink,dw,ind);//performance of the DFS (Weight) algorithm
dist=ones(1,g.node_number);//distance vector used in NARVAL_R_AggregationTree 
dist(sink)=100000000;//initialization of the value for the sink
[dataBFS]=NARVAL_R_AggregationTree(predBFS,dist,sink);//application of NARVAL_R_AggregationTree
[dataBFSW]=NARVAL_R_AggregationTree(predBFSW,dist,sink);//application of NARVAL_R_AggregationTree
[dataDFS]=NARVAL_R_AggregationTree(predDFS,dist,sink);//application of NARVAL_R_AggregationTree
[dataDFSW]=NARVAL_R_AggregationTree(predDFSW,dist,sink);//application of NARVAL_R_AggregationTree
ip=ind+1;//window index
ymax=max([dataBFS(:,$); dataBFSW(:,$); dataDFS(:,$);dataDFSW(:,$);np']);//graph visualization
scf(ip);
clf(ip);
subplot(321)
plot2d(1:n,dataBFS(:,$)',style=st(1),rect=[1 0 n ymax]);
plot2d3(1:n,dataBFS(:,$)',style=st(1),rect=[1 0 n ymax]);
xtitle('BFS','Sensor ID','Aggregation Level','');
xgrid(1);
subplot(322)
plot2d(1:n,dataBFSW(:,$)',style=st(2),rect=[1 0 n ymax]);
plot2d3(1:n,dataBFSW(:,$)',style=st(2),rect=[1 0 n ymax]);
xtitle('BFS Degree','Sensor ID','Aggregation Level','');
xgrid(1);
subplot(3,2,3)
plot2d(1:n,dataDFS(:,$)',style=st(3),rect=[1 0 n ymax]);
plot2d3(1:n,dataDFS(:,$)',style=st(3),rect=[1 0 n ymax]);
xtitle('DFS','Sensor ID','Aggregation Level','');
xgrid(1);
subplot(3,2,4)
plot2d(1:n,dataDFSW(:,$)',style=st(4),rect=[1 0 n ymax]);
plot2d3(1:n,dataDFSW(:,$)',style=st(4),rect=[1 0 n ymax]);
xtitle('DFS Degree','Sensor ID','Aggregation Level','');
xgrid(1);
subplot(3,2,5)
plot2d(1:n,np,style=st(5),rect=[1 0 n ymax]);
plot2d3(1:n,np,style=st(5),rect=[1 0 n ymax]);
xtitle('Pure Flooding','Sensor ID','Aggregation Level','');
xgrid(1);

Dependency

NARVAL_F_Remov, NARVAL_R_PredRoute

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_P_UnderlayInter NARVAL NARVAL_R_AggregationWCDS >>